@roomle/embedding-lib 0.0.0-dev-b626163 → 0.0.0-dev-2de4423

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hi.js CHANGED
@@ -140,6 +140,16 @@ var n = (e, t) => t === e.libraryId ? e : {
140
140
  }, E = (e) => `https://esm.sh/${e}?deps=zod@4.6.5`, D = 16, O = async ({ provider: e, model: t, apiKey: n, baseUrl: r, chatCompletions: i, reasoningEffort: a }, o) => {
141
141
  let s = o ? { fetch: async (e, t) => (typeof t?.body == "string" && await o(t.body), fetch(e, t)) } : {};
142
142
  switch (e) {
143
+ case "openai": {
144
+ let { createOpenAI: e } = await import(
145
+ /* @vite-ignore */
146
+ E("@ai-sdk/openai@4.0.81")
147
+ );
148
+ return { languageModel: e({
149
+ apiKey: n,
150
+ ...s
151
+ })(t) };
152
+ }
143
153
  case "azure": {
144
154
  let { createAzure: e } = await import(
145
155
  /* @vite-ignore */
@@ -185,7 +195,7 @@ var n = (e, t) => t === e.libraryId ? e : {
185
195
  ...s
186
196
  })(t) };
187
197
  }
188
- default: throw Error(`Unknown provider "${e}" - supported: azure, mistral, anthropic, google`);
198
+ default: throw Error(`Unknown provider "${e}" - supported: azure, openai, mistral, anthropic, google`);
189
199
  }
190
200
  }, k = async (e, t, n) => {
191
201
  let r = e.extended, i = (e) => r.planningAssistantOutput(e), a = [], o;
package/hi.min.js CHANGED
@@ -128,6 +128,13 @@ var n = (e, t) => t === e.libraryId ? e : {
128
128
  }, w = (e) => `https://esm.sh/${e}?deps=zod@4.6.5`, T = async ({ provider: e, model: t, apiKey: n, baseUrl: r, chatCompletions: i, reasoningEffort: a }, o) => {
129
129
  let s = o ? { fetch: async (e, t) => (typeof t?.body == "string" && await o(t.body), fetch(e, t)) } : {};
130
130
  switch (e) {
131
+ case "openai": {
132
+ let { createOpenAI: e } = await import(w("@ai-sdk/openai@4.0.81"));
133
+ return { languageModel: e({
134
+ apiKey: n,
135
+ ...s
136
+ })(t) };
137
+ }
131
138
  case "azure": {
132
139
  let { createAzure: e } = await import(w("@ai-sdk/azure@4.0.85")), o = e({
133
140
  apiKey: n,
@@ -161,7 +168,7 @@ var n = (e, t) => t === e.libraryId ? e : {
161
168
  ...s
162
169
  })(t) };
163
170
  }
164
- default: throw Error(`Unknown provider "${e}" - supported: azure, mistral, anthropic, google`);
171
+ default: throw Error(`Unknown provider "${e}" - supported: azure, openai, mistral, anthropic, google`);
165
172
  }
166
173
  }, E = async (e, t, n) => {
167
174
  let r = e.extended, i = (e) => r.planningAssistantOutput(e), a, o = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "0.0.0-dev-b626163",
3
+ "version": "0.0.0-dev-2de4423",
4
4
  "description": "This is a small library which can be used to communicate with the Roomle Configurator. ES modules only (browser-compatible).",
5
5
  "type": "module",
6
6
  "main": "./roomle-embedding-lib.js",
@@ -6,7 +6,7 @@ import { HiMcpPlannerApi } from './hi-mcp-tools';
6
6
  */
7
7
  export interface PlanningAssistantConfig {
8
8
  /** `azure` for a deployment on an Azure AI Foundry resource, else the provider of the model. */
9
- provider: 'azure' | 'mistral' | 'anthropic' | 'google';
9
+ provider: 'azure' | 'openai' | 'mistral' | 'anthropic' | 'google';
10
10
  /** The model id at the provider; for `azure` the name of the deployment. */
11
11
  model: string;
12
12
  /** The API key of the provider; for `azure` the key of the Foundry resource. */
@@ -41,15 +41,15 @@ export type PlanningAssistantPlannerApi = HiMcpPlannerApi & {
41
41
  };
42
42
  /** The AI SDK language model of the config and the provider options `streamText` takes with it. */
43
43
  export declare const loadChatModel: ({ provider, model, apiKey, baseUrl, chatCompletions, reasoningEffort, }: PlanningAssistantConfig, observeRequest?: (body: string) => Promise<void>) => Promise<{
44
+ languageModel: any;
45
+ providerOptions?: undefined;
46
+ } | {
44
47
  languageModel: any;
45
48
  providerOptions: {
46
49
  azure: {
47
50
  reasoningEffort: string;
48
51
  };
49
52
  };
50
- } | {
51
- languageModel: any;
52
- providerOptions?: undefined;
53
53
  }>;
54
54
  /**
55
55
  * Runs the planning agent of the AI Planning Assistant window