@desplega.ai/agent-swarm 1.76.0 → 1.76.1
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/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Agent Swarm API",
|
|
5
|
-
"version": "1.76.
|
|
5
|
+
"version": "1.76.1",
|
|
6
6
|
"description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
package/package.json
CHANGED
|
@@ -17,15 +17,27 @@ export class OpenAIEmbeddingProvider implements EmbeddingProvider {
|
|
|
17
17
|
private readonly apiKey: string | undefined;
|
|
18
18
|
|
|
19
19
|
constructor(config?: OpenAIEmbeddingConfig) {
|
|
20
|
-
this.apiKey = config?.apiKey ?? process.env.OPENAI_API_KEY;
|
|
21
|
-
|
|
22
|
-
this.
|
|
23
|
-
|
|
20
|
+
this.apiKey = config?.apiKey ?? process.env.EMBEDDING_API_KEY ?? process.env.OPENAI_API_KEY;
|
|
21
|
+
|
|
22
|
+
this.model = config?.model ?? process.env.EMBEDDING_MODEL ?? "text-embedding-3-small";
|
|
23
|
+
|
|
24
|
+
this.dimensions =
|
|
25
|
+
config?.dimensions ??
|
|
26
|
+
Number(process.env.EMBEDDING_DIMENSIONS) ??
|
|
27
|
+
DEFAULT_EMBEDDING_DIMENSIONS;
|
|
28
|
+
|
|
29
|
+
this.name = config?.model
|
|
30
|
+
? `openai/${config.model}`
|
|
31
|
+
: (process.env.EMBEDDING_MODEL ?? DEFAULT_EMBEDDING_MODEL);
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
private getClient(): OpenAI | null {
|
|
27
35
|
if (!this.apiKey) return null;
|
|
28
|
-
if (!this.client)
|
|
36
|
+
if (!this.client)
|
|
37
|
+
this.client = new OpenAI({
|
|
38
|
+
baseURL: process.env.EMBEDDING_API_BASE_URL, // Optional custom base URL
|
|
39
|
+
apiKey: this.apiKey,
|
|
40
|
+
});
|
|
29
41
|
return this.client;
|
|
30
42
|
}
|
|
31
43
|
|