graphlit-client 1.0.20250711001 → 1.0.20250713002
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/README.md +4 -4
- package/dist/streaming/providers.js +1 -4
- package/package.json +1 -1
package/README.md
CHANGED
@@ -404,9 +404,9 @@ if (process.env.OPENAI_API_KEY) {
|
|
404
404
|
}
|
405
405
|
|
406
406
|
if (process.env.COHERE_API_KEY) {
|
407
|
-
const {
|
407
|
+
const { CohereClientV2 } = await import("cohere-ai");
|
408
408
|
client.setCohereClient(
|
409
|
-
new
|
409
|
+
new CohereClientV2({ token: process.env.COHERE_API_KEY }),
|
410
410
|
);
|
411
411
|
}
|
412
412
|
|
@@ -568,9 +568,9 @@ if (process.env.OPENAI_API_KEY) {
|
|
568
568
|
}
|
569
569
|
|
570
570
|
if (process.env.COHERE_API_KEY) {
|
571
|
-
const {
|
571
|
+
const { CohereClientV2 } = await import("cohere-ai");
|
572
572
|
client.setCohereClient(
|
573
|
-
new
|
573
|
+
new CohereClientV2({ token: process.env.COHERE_API_KEY }),
|
574
574
|
);
|
575
575
|
}
|
576
576
|
|
@@ -1798,10 +1798,7 @@ onEvent, onComplete, abortSignal) {
|
|
1798
1798
|
process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
|
1799
1799
|
console.log(`🔍 [Cohere] Full streamConfig for ${modelName}:`, JSON.stringify(streamConfig, null, 2));
|
1800
1800
|
}
|
1801
|
-
stream = await cohereClient.chatStream({
|
1802
|
-
...streamConfig,
|
1803
|
-
...(abortSignal && { signal: abortSignal }),
|
1804
|
-
});
|
1801
|
+
stream = await cohereClient.chatStream(streamConfig, abortSignal ? { abortSignal } : undefined);
|
1805
1802
|
}
|
1806
1803
|
catch (streamError) {
|
1807
1804
|
// Enhanced error logging
|