mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
add lib tests
This commit is contained in:

committed by
Geoff Seemueller

parent
7019aa30bc
commit
108e5fbd47
@@ -1,5 +1,5 @@
|
||||
import Anthropic from "@anthropic-ai/sdk";
|
||||
import { OpenAI } from "openai";
|
||||
import {OpenAI} from "openai";
|
||||
import {
|
||||
_NotCustomized,
|
||||
ISimpleType,
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
UnionStringArray,
|
||||
} from "mobx-state-tree";
|
||||
import ChatSdk from "../lib/chat-sdk";
|
||||
import { BaseChatProvider, CommonProviderParams } from "./chat-stream-provider";
|
||||
import {BaseChatProvider, CommonProviderParams} from "./chat-stream-provider";
|
||||
|
||||
export class ClaudeChatProvider extends BaseChatProvider {
|
||||
private anthropic: Anthropic | null = null;
|
||||
@@ -51,11 +51,11 @@ export class ClaudeChatProvider extends BaseChatProvider {
|
||||
],
|
||||
},
|
||||
});
|
||||
return true; // Break the stream
|
||||
return true;
|
||||
}
|
||||
|
||||
dataCallback({ type: "chat", data: chunk });
|
||||
return false; // Continue the stream
|
||||
return false;
|
||||
}
|
||||
|
||||
// Override the base handleStream method to use Anthropic client instead of OpenAI
|
||||
|
Reference in New Issue
Block a user