@yourgpt/llm-sdk 2.1.4-alpha.1 → 2.1.4-alpha.3
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/dist/adapters/index.d.mts +4 -2
- package/dist/adapters/index.d.ts +4 -2
- package/dist/base-5n-UuPfS.d.mts +768 -0
- package/dist/base-Di31iy_8.d.ts +768 -0
- package/dist/fallback/index.d.mts +96 -0
- package/dist/fallback/index.d.ts +96 -0
- package/dist/fallback/index.js +284 -0
- package/dist/fallback/index.mjs +280 -0
- package/dist/index.d.mts +62 -3
- package/dist/index.d.ts +62 -3
- package/dist/index.js +117 -2
- package/dist/index.mjs +116 -3
- package/dist/providers/anthropic/index.d.mts +3 -1
- package/dist/providers/anthropic/index.d.ts +3 -1
- package/dist/providers/azure/index.d.mts +3 -1
- package/dist/providers/azure/index.d.ts +3 -1
- package/dist/providers/google/index.d.mts +3 -1
- package/dist/providers/google/index.d.ts +3 -1
- package/dist/providers/ollama/index.d.mts +4 -2
- package/dist/providers/ollama/index.d.ts +4 -2
- package/dist/providers/openai/index.d.mts +3 -1
- package/dist/providers/openai/index.d.ts +3 -1
- package/dist/providers/openrouter/index.d.mts +3 -1
- package/dist/providers/openrouter/index.d.ts +3 -1
- package/dist/providers/xai/index.d.mts +3 -1
- package/dist/providers/xai/index.d.ts +3 -1
- package/dist/types-BQl1suAv.d.mts +212 -0
- package/dist/types-C0vLXzuw.d.ts +355 -0
- package/dist/types-CNL8ZRne.d.ts +212 -0
- package/dist/types-CR8mi9I0.d.mts +417 -0
- package/dist/types-CR8mi9I0.d.ts +417 -0
- package/dist/types-VDgiUvH2.d.mts +355 -0
- package/dist/yourgpt/index.d.mts +77 -0
- package/dist/yourgpt/index.d.ts +77 -0
- package/dist/yourgpt/index.js +167 -0
- package/dist/yourgpt/index.mjs +164 -0
- package/package.json +12 -1
- package/dist/adapters/index.js.map +0 -1
- package/dist/adapters/index.mjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/providers/anthropic/index.js.map +0 -1
- package/dist/providers/anthropic/index.mjs.map +0 -1
- package/dist/providers/azure/index.js.map +0 -1
- package/dist/providers/azure/index.mjs.map +0 -1
- package/dist/providers/google/index.js.map +0 -1
- package/dist/providers/google/index.mjs.map +0 -1
- package/dist/providers/ollama/index.js.map +0 -1
- package/dist/providers/ollama/index.mjs.map +0 -1
- package/dist/providers/openai/index.js.map +0 -1
- package/dist/providers/openai/index.mjs.map +0 -1
- package/dist/providers/openrouter/index.js.map +0 -1
- package/dist/providers/openrouter/index.mjs.map +0 -1
- package/dist/providers/xai/index.js.map +0 -1
- package/dist/providers/xai/index.mjs.map +0 -1
- package/dist/types-COAOEe_y.d.mts +0 -1460
- package/dist/types-COAOEe_y.d.ts +0 -1460
package/dist/index.js
CHANGED
|
@@ -553,6 +553,54 @@ function createMessage(partial) {
|
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
555
|
|
|
556
|
+
// src/server/storage-helpers.ts
|
|
557
|
+
function extractInputMessages(reqMessages) {
|
|
558
|
+
if (!reqMessages?.length) return [];
|
|
559
|
+
let lastMeaningful = null;
|
|
560
|
+
for (let i = reqMessages.length - 1; i >= 0; i--) {
|
|
561
|
+
const m = reqMessages[i];
|
|
562
|
+
if (m.role === "assistant" && (!m.content || m.content === "")) continue;
|
|
563
|
+
lastMeaningful = m;
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
if (!lastMeaningful) return [];
|
|
567
|
+
if (lastMeaningful.role === "user") {
|
|
568
|
+
const textContent = typeof lastMeaningful.content === "string" ? lastMeaningful.content : JSON.stringify(lastMeaningful.content);
|
|
569
|
+
const attachments = lastMeaningful.attachments;
|
|
570
|
+
const imageAtt = attachments?.find((a) => a.type === "image" && a.url);
|
|
571
|
+
const fileAtt = attachments?.find((a) => a.type === "file" && a.url);
|
|
572
|
+
const msg = { role: "user", content: textContent || "" };
|
|
573
|
+
if (imageAtt?.url) {
|
|
574
|
+
msg.contentType = "image";
|
|
575
|
+
msg.url = imageAtt.url;
|
|
576
|
+
} else if (fileAtt?.url) {
|
|
577
|
+
msg.contentType = "file";
|
|
578
|
+
msg.url = fileAtt.url;
|
|
579
|
+
}
|
|
580
|
+
return [msg];
|
|
581
|
+
}
|
|
582
|
+
if (lastMeaningful.role === "tool" || lastMeaningful.role === "function") {
|
|
583
|
+
const msgs = reqMessages;
|
|
584
|
+
const lastAssistantIdx = msgs.map((m) => m.role).lastIndexOf("assistant");
|
|
585
|
+
return msgs.slice(lastAssistantIdx + 1).filter(
|
|
586
|
+
(m) => !(m.role === "assistant" && (!m.content || m.content === ""))
|
|
587
|
+
).map((m) => ({
|
|
588
|
+
role: m.role,
|
|
589
|
+
content: typeof m.content === "string" ? m.content : JSON.stringify(m.content),
|
|
590
|
+
toolCallId: m.tool_call_id
|
|
591
|
+
}));
|
|
592
|
+
}
|
|
593
|
+
return [];
|
|
594
|
+
}
|
|
595
|
+
function mapOutputMessages(resultMessages) {
|
|
596
|
+
return resultMessages.map((m) => ({
|
|
597
|
+
role: m.role,
|
|
598
|
+
content: m.content ?? "",
|
|
599
|
+
toolCalls: m.tool_calls,
|
|
600
|
+
toolCallId: m.tool_call_id
|
|
601
|
+
}));
|
|
602
|
+
}
|
|
603
|
+
|
|
556
604
|
// src/server/streaming.ts
|
|
557
605
|
function createSSEHeaders() {
|
|
558
606
|
return {
|
|
@@ -951,6 +999,7 @@ var StreamResult = class {
|
|
|
951
999
|
toolCalls: [],
|
|
952
1000
|
requiresAction: false,
|
|
953
1001
|
usage: void 0,
|
|
1002
|
+
threadId: void 0,
|
|
954
1003
|
events: []
|
|
955
1004
|
};
|
|
956
1005
|
}
|
|
@@ -996,6 +1045,9 @@ var StreamResult = class {
|
|
|
996
1045
|
this.capturedUsage = event.usage;
|
|
997
1046
|
collected.usage = event.usage;
|
|
998
1047
|
}
|
|
1048
|
+
if (event.threadId) {
|
|
1049
|
+
collected.threadId = event.threadId;
|
|
1050
|
+
}
|
|
999
1051
|
break;
|
|
1000
1052
|
}
|
|
1001
1053
|
}
|
|
@@ -1008,6 +1060,7 @@ var StreamResult = class {
|
|
|
1008
1060
|
const usage = this.capturedUsage;
|
|
1009
1061
|
await this.onFinishCallback({
|
|
1010
1062
|
messages: collected.messages,
|
|
1063
|
+
threadId: collected.threadId,
|
|
1011
1064
|
usage: usage ? {
|
|
1012
1065
|
promptTokens: usage.prompt_tokens,
|
|
1013
1066
|
completionTokens: usage.completion_tokens,
|
|
@@ -1495,6 +1548,7 @@ var Runtime = class {
|
|
|
1495
1548
|
this.actions = /* @__PURE__ */ new Map();
|
|
1496
1549
|
this.tools = /* @__PURE__ */ new Map();
|
|
1497
1550
|
this.config = config;
|
|
1551
|
+
this.storage = config.storage;
|
|
1498
1552
|
if ("provider" in config && config.provider) {
|
|
1499
1553
|
this.adapter = config.provider.languageModel(config.model);
|
|
1500
1554
|
} else if ("adapter" in config && config.adapter) {
|
|
@@ -2744,8 +2798,67 @@ var Runtime = class {
|
|
|
2744
2798
|
* ```
|
|
2745
2799
|
*/
|
|
2746
2800
|
stream(request, options) {
|
|
2747
|
-
const
|
|
2748
|
-
|
|
2801
|
+
const storage = this.storage;
|
|
2802
|
+
if (!storage) {
|
|
2803
|
+
const generator = this.processChatWithLoop(request, options?.signal);
|
|
2804
|
+
return new StreamResult(generator, { onFinish: options?.onFinish });
|
|
2805
|
+
}
|
|
2806
|
+
let resolvedThreadId = request.threadId;
|
|
2807
|
+
const self = this;
|
|
2808
|
+
let storageHealthy = true;
|
|
2809
|
+
async function* storageWrappedGenerator() {
|
|
2810
|
+
if (!resolvedThreadId) {
|
|
2811
|
+
try {
|
|
2812
|
+
const session = await storage.createSession();
|
|
2813
|
+
resolvedThreadId = session.id;
|
|
2814
|
+
} catch (err) {
|
|
2815
|
+
console.error(
|
|
2816
|
+
"[Runtime] storage.createSession failed \u2014 generating fallback threadId:",
|
|
2817
|
+
err
|
|
2818
|
+
);
|
|
2819
|
+
resolvedThreadId = `local_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
2820
|
+
storageHealthy = false;
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
if (resolvedThreadId && storageHealthy) {
|
|
2824
|
+
try {
|
|
2825
|
+
const inputMsgs = extractInputMessages(request.messages);
|
|
2826
|
+
if (inputMsgs.length) {
|
|
2827
|
+
await storage.saveMessages(resolvedThreadId, inputMsgs);
|
|
2828
|
+
}
|
|
2829
|
+
} catch (err) {
|
|
2830
|
+
console.error("[Runtime] storage.saveMessages (input) failed:", err);
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
for await (const event of self.processChatWithLoop(
|
|
2834
|
+
request,
|
|
2835
|
+
options?.signal
|
|
2836
|
+
)) {
|
|
2837
|
+
if (event.type === "done" && resolvedThreadId) {
|
|
2838
|
+
yield { ...event, threadId: resolvedThreadId };
|
|
2839
|
+
} else {
|
|
2840
|
+
yield event;
|
|
2841
|
+
}
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
return new StreamResult(storageWrappedGenerator(), {
|
|
2845
|
+
onFinish: async (result) => {
|
|
2846
|
+
if (resolvedThreadId && storageHealthy && result.messages.length > 0) {
|
|
2847
|
+
try {
|
|
2848
|
+
const outputMsgs = mapOutputMessages(result.messages);
|
|
2849
|
+
await storage.saveMessages(resolvedThreadId, outputMsgs);
|
|
2850
|
+
} catch (err) {
|
|
2851
|
+
console.error(
|
|
2852
|
+
"[Runtime] storage.saveMessages (output) failed:",
|
|
2853
|
+
err
|
|
2854
|
+
);
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
if (options?.onFinish) {
|
|
2858
|
+
await options.onFinish({ ...result, threadId: resolvedThreadId });
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
});
|
|
2749
2862
|
}
|
|
2750
2863
|
/**
|
|
2751
2864
|
* Chat and collect the full response (non-streaming)
|
|
@@ -3703,6 +3816,7 @@ exports.createSSEResponse = createSSEResponse;
|
|
|
3703
3816
|
exports.createStreamResult = createStreamResult;
|
|
3704
3817
|
exports.createTextStreamHeaders = createTextStreamHeaders;
|
|
3705
3818
|
exports.createTextStreamResponse = createTextStreamResponse;
|
|
3819
|
+
exports.extractInputMessages = extractInputMessages;
|
|
3706
3820
|
exports.formatSSEData = formatSSEData;
|
|
3707
3821
|
exports.formatToolsForAnthropic = formatToolsForAnthropic;
|
|
3708
3822
|
exports.formatToolsForGoogle = formatToolsForGoogle;
|
|
@@ -3711,6 +3825,7 @@ exports.generateMessageId = generateMessageId;
|
|
|
3711
3825
|
exports.generateText = generateText;
|
|
3712
3826
|
exports.generateThreadId = generateThreadId;
|
|
3713
3827
|
exports.generateToolCallId = generateToolCallId;
|
|
3828
|
+
exports.mapOutputMessages = mapOutputMessages;
|
|
3714
3829
|
exports.pipeSSEToResponse = pipeSSEToResponse;
|
|
3715
3830
|
exports.pipeTextToResponse = pipeTextToResponse;
|
|
3716
3831
|
exports.runAgentLoop = runAgentLoop;
|
package/dist/index.mjs
CHANGED
|
@@ -551,6 +551,54 @@ function createMessage(partial) {
|
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
+
// src/server/storage-helpers.ts
|
|
555
|
+
function extractInputMessages(reqMessages) {
|
|
556
|
+
if (!reqMessages?.length) return [];
|
|
557
|
+
let lastMeaningful = null;
|
|
558
|
+
for (let i = reqMessages.length - 1; i >= 0; i--) {
|
|
559
|
+
const m = reqMessages[i];
|
|
560
|
+
if (m.role === "assistant" && (!m.content || m.content === "")) continue;
|
|
561
|
+
lastMeaningful = m;
|
|
562
|
+
break;
|
|
563
|
+
}
|
|
564
|
+
if (!lastMeaningful) return [];
|
|
565
|
+
if (lastMeaningful.role === "user") {
|
|
566
|
+
const textContent = typeof lastMeaningful.content === "string" ? lastMeaningful.content : JSON.stringify(lastMeaningful.content);
|
|
567
|
+
const attachments = lastMeaningful.attachments;
|
|
568
|
+
const imageAtt = attachments?.find((a) => a.type === "image" && a.url);
|
|
569
|
+
const fileAtt = attachments?.find((a) => a.type === "file" && a.url);
|
|
570
|
+
const msg = { role: "user", content: textContent || "" };
|
|
571
|
+
if (imageAtt?.url) {
|
|
572
|
+
msg.contentType = "image";
|
|
573
|
+
msg.url = imageAtt.url;
|
|
574
|
+
} else if (fileAtt?.url) {
|
|
575
|
+
msg.contentType = "file";
|
|
576
|
+
msg.url = fileAtt.url;
|
|
577
|
+
}
|
|
578
|
+
return [msg];
|
|
579
|
+
}
|
|
580
|
+
if (lastMeaningful.role === "tool" || lastMeaningful.role === "function") {
|
|
581
|
+
const msgs = reqMessages;
|
|
582
|
+
const lastAssistantIdx = msgs.map((m) => m.role).lastIndexOf("assistant");
|
|
583
|
+
return msgs.slice(lastAssistantIdx + 1).filter(
|
|
584
|
+
(m) => !(m.role === "assistant" && (!m.content || m.content === ""))
|
|
585
|
+
).map((m) => ({
|
|
586
|
+
role: m.role,
|
|
587
|
+
content: typeof m.content === "string" ? m.content : JSON.stringify(m.content),
|
|
588
|
+
toolCallId: m.tool_call_id
|
|
589
|
+
}));
|
|
590
|
+
}
|
|
591
|
+
return [];
|
|
592
|
+
}
|
|
593
|
+
function mapOutputMessages(resultMessages) {
|
|
594
|
+
return resultMessages.map((m) => ({
|
|
595
|
+
role: m.role,
|
|
596
|
+
content: m.content ?? "",
|
|
597
|
+
toolCalls: m.tool_calls,
|
|
598
|
+
toolCallId: m.tool_call_id
|
|
599
|
+
}));
|
|
600
|
+
}
|
|
601
|
+
|
|
554
602
|
// src/server/streaming.ts
|
|
555
603
|
function createSSEHeaders() {
|
|
556
604
|
return {
|
|
@@ -949,6 +997,7 @@ var StreamResult = class {
|
|
|
949
997
|
toolCalls: [],
|
|
950
998
|
requiresAction: false,
|
|
951
999
|
usage: void 0,
|
|
1000
|
+
threadId: void 0,
|
|
952
1001
|
events: []
|
|
953
1002
|
};
|
|
954
1003
|
}
|
|
@@ -994,6 +1043,9 @@ var StreamResult = class {
|
|
|
994
1043
|
this.capturedUsage = event.usage;
|
|
995
1044
|
collected.usage = event.usage;
|
|
996
1045
|
}
|
|
1046
|
+
if (event.threadId) {
|
|
1047
|
+
collected.threadId = event.threadId;
|
|
1048
|
+
}
|
|
997
1049
|
break;
|
|
998
1050
|
}
|
|
999
1051
|
}
|
|
@@ -1006,6 +1058,7 @@ var StreamResult = class {
|
|
|
1006
1058
|
const usage = this.capturedUsage;
|
|
1007
1059
|
await this.onFinishCallback({
|
|
1008
1060
|
messages: collected.messages,
|
|
1061
|
+
threadId: collected.threadId,
|
|
1009
1062
|
usage: usage ? {
|
|
1010
1063
|
promptTokens: usage.prompt_tokens,
|
|
1011
1064
|
completionTokens: usage.completion_tokens,
|
|
@@ -1493,6 +1546,7 @@ var Runtime = class {
|
|
|
1493
1546
|
this.actions = /* @__PURE__ */ new Map();
|
|
1494
1547
|
this.tools = /* @__PURE__ */ new Map();
|
|
1495
1548
|
this.config = config;
|
|
1549
|
+
this.storage = config.storage;
|
|
1496
1550
|
if ("provider" in config && config.provider) {
|
|
1497
1551
|
this.adapter = config.provider.languageModel(config.model);
|
|
1498
1552
|
} else if ("adapter" in config && config.adapter) {
|
|
@@ -2742,8 +2796,67 @@ var Runtime = class {
|
|
|
2742
2796
|
* ```
|
|
2743
2797
|
*/
|
|
2744
2798
|
stream(request, options) {
|
|
2745
|
-
const
|
|
2746
|
-
|
|
2799
|
+
const storage = this.storage;
|
|
2800
|
+
if (!storage) {
|
|
2801
|
+
const generator = this.processChatWithLoop(request, options?.signal);
|
|
2802
|
+
return new StreamResult(generator, { onFinish: options?.onFinish });
|
|
2803
|
+
}
|
|
2804
|
+
let resolvedThreadId = request.threadId;
|
|
2805
|
+
const self = this;
|
|
2806
|
+
let storageHealthy = true;
|
|
2807
|
+
async function* storageWrappedGenerator() {
|
|
2808
|
+
if (!resolvedThreadId) {
|
|
2809
|
+
try {
|
|
2810
|
+
const session = await storage.createSession();
|
|
2811
|
+
resolvedThreadId = session.id;
|
|
2812
|
+
} catch (err) {
|
|
2813
|
+
console.error(
|
|
2814
|
+
"[Runtime] storage.createSession failed \u2014 generating fallback threadId:",
|
|
2815
|
+
err
|
|
2816
|
+
);
|
|
2817
|
+
resolvedThreadId = `local_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
2818
|
+
storageHealthy = false;
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
if (resolvedThreadId && storageHealthy) {
|
|
2822
|
+
try {
|
|
2823
|
+
const inputMsgs = extractInputMessages(request.messages);
|
|
2824
|
+
if (inputMsgs.length) {
|
|
2825
|
+
await storage.saveMessages(resolvedThreadId, inputMsgs);
|
|
2826
|
+
}
|
|
2827
|
+
} catch (err) {
|
|
2828
|
+
console.error("[Runtime] storage.saveMessages (input) failed:", err);
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
for await (const event of self.processChatWithLoop(
|
|
2832
|
+
request,
|
|
2833
|
+
options?.signal
|
|
2834
|
+
)) {
|
|
2835
|
+
if (event.type === "done" && resolvedThreadId) {
|
|
2836
|
+
yield { ...event, threadId: resolvedThreadId };
|
|
2837
|
+
} else {
|
|
2838
|
+
yield event;
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
return new StreamResult(storageWrappedGenerator(), {
|
|
2843
|
+
onFinish: async (result) => {
|
|
2844
|
+
if (resolvedThreadId && storageHealthy && result.messages.length > 0) {
|
|
2845
|
+
try {
|
|
2846
|
+
const outputMsgs = mapOutputMessages(result.messages);
|
|
2847
|
+
await storage.saveMessages(resolvedThreadId, outputMsgs);
|
|
2848
|
+
} catch (err) {
|
|
2849
|
+
console.error(
|
|
2850
|
+
"[Runtime] storage.saveMessages (output) failed:",
|
|
2851
|
+
err
|
|
2852
|
+
);
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
if (options?.onFinish) {
|
|
2856
|
+
await options.onFinish({ ...result, threadId: resolvedThreadId });
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
});
|
|
2747
2860
|
}
|
|
2748
2861
|
/**
|
|
2749
2862
|
* Chat and collect the full response (non-streaming)
|
|
@@ -3683,6 +3796,6 @@ async function executeToolCalls(toolCalls, tools, executeServerTool, waitForClie
|
|
|
3683
3796
|
return results;
|
|
3684
3797
|
}
|
|
3685
3798
|
|
|
3686
|
-
export { DEFAULT_CAPABILITIES, DEFAULT_MAX_ITERATIONS, GenerateResult, Runtime, StreamResult, buildProviderToolOptions, createEventStream, createExpressHandler, createExpressMiddleware, createHonoApp, createNextHandler, createNodeHandler, createRuntime, createSSEHeaders, createSSEResponse, createStreamResult, createTextStreamHeaders, createTextStreamResponse, formatSSEData, formatToolsForAnthropic, formatToolsForGoogle, formatToolsForOpenAI, generateMessageId, generateText, generateThreadId, generateToolCallId, pipeSSEToResponse, pipeTextToResponse, runAgentLoop, searchTools, selectTools, shouldExposeToolSearch, streamText, tool };
|
|
3799
|
+
export { DEFAULT_CAPABILITIES, DEFAULT_MAX_ITERATIONS, GenerateResult, Runtime, StreamResult, buildProviderToolOptions, createEventStream, createExpressHandler, createExpressMiddleware, createHonoApp, createNextHandler, createNodeHandler, createRuntime, createSSEHeaders, createSSEResponse, createStreamResult, createTextStreamHeaders, createTextStreamResponse, extractInputMessages, formatSSEData, formatToolsForAnthropic, formatToolsForGoogle, formatToolsForOpenAI, generateMessageId, generateText, generateThreadId, generateToolCallId, mapOutputMessages, pipeSSEToResponse, pipeTextToResponse, runAgentLoop, searchTools, selectTools, shouldExposeToolSearch, streamText, tool };
|
|
3687
3800
|
//# sourceMappingURL=index.mjs.map
|
|
3688
3801
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.mjs';
|
|
2
|
+
import { a as AnthropicProviderConfig, A as AIProvider } from '../../types-VDgiUvH2.mjs';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-5n-UuPfS.mjs';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Anthropic Provider - Modern Pattern
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.js';
|
|
2
|
+
import { a as AnthropicProviderConfig, A as AIProvider } from '../../types-C0vLXzuw.js';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-Di31iy_8.js';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Anthropic Provider - Modern Pattern
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as AzureProviderConfig, A as AIProvider } from '../../types-VDgiUvH2.mjs';
|
|
2
|
+
import '../../base-5n-UuPfS.mjs';
|
|
3
|
+
import '../../types-CR8mi9I0.mjs';
|
|
2
4
|
import 'zod';
|
|
3
5
|
|
|
4
6
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.mjs';
|
|
2
|
+
import { G as GoogleProviderConfig, A as AIProvider } from '../../types-VDgiUvH2.mjs';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-5n-UuPfS.mjs';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Google Provider - OpenAI-Compatible
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.js';
|
|
2
|
+
import { G as GoogleProviderConfig, A as AIProvider } from '../../types-C0vLXzuw.js';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-Di31iy_8.js';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Google Provider - OpenAI-Compatible
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { c as OllamaProviderConfig, A as AIProvider } from '../../types-VDgiUvH2.mjs';
|
|
2
|
+
export { d as OllamaModelOptions } from '../../types-VDgiUvH2.mjs';
|
|
3
|
+
import '../../base-5n-UuPfS.mjs';
|
|
4
|
+
import '../../types-CR8mi9I0.mjs';
|
|
3
5
|
import 'zod';
|
|
4
6
|
|
|
5
7
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { c as OllamaProviderConfig, A as AIProvider } from '../../types-C0vLXzuw.js';
|
|
2
|
+
export { d as OllamaModelOptions } from '../../types-C0vLXzuw.js';
|
|
3
|
+
import '../../base-Di31iy_8.js';
|
|
4
|
+
import '../../types-CR8mi9I0.js';
|
|
3
5
|
import 'zod';
|
|
4
6
|
|
|
5
7
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.mjs';
|
|
2
|
+
import { O as OpenAIProviderConfig, A as AIProvider } from '../../types-VDgiUvH2.mjs';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-5n-UuPfS.mjs';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* OpenAI Provider - Modern Pattern
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.js';
|
|
2
|
+
import { O as OpenAIProviderConfig, A as AIProvider } from '../../types-C0vLXzuw.js';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-Di31iy_8.js';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* OpenAI Provider - Modern Pattern
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.mjs';
|
|
2
|
+
import { A as AIProvider } from '../../types-VDgiUvH2.mjs';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-5n-UuPfS.mjs';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* OpenRouter Provider - Modern Pattern
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.js';
|
|
2
|
+
import { A as AIProvider } from '../../types-C0vLXzuw.js';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-Di31iy_8.js';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* OpenRouter Provider - Modern Pattern
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.mjs';
|
|
2
|
+
import { X as XAIProviderConfig, A as AIProvider } from '../../types-VDgiUvH2.mjs';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-5n-UuPfS.mjs';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* xAI Provider - Modern Pattern
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LanguageModel } from '../../types-CR8mi9I0.js';
|
|
2
|
+
import { X as XAIProviderConfig, A as AIProvider } from '../../types-C0vLXzuw.js';
|
|
2
3
|
import 'zod';
|
|
4
|
+
import '../../base-Di31iy_8.js';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* xAI Provider - Modern Pattern
|