@graf-research/llm-runner 0.0.15 → 0.0.16

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.
@@ -8,7 +8,7 @@ import { ChatModel as ChatGPTModel } from "openai/resources";
8
8
  export declare class ChatGPTLLM extends LLMRunner.BaseLLM {
9
9
  private cgpt;
10
10
  private model;
11
- constructor(api_key: string, model: ChatGPTModel, chat_session_manager?: GenericLLM.ChatSessionManager<LLMRunner.ChatSession, LLMRunner.Message>);
11
+ constructor(api_key: string, model: ChatGPTModel, chat_session_manager?: GenericLLM.ChatSessionManager<LLMRunner.ChatSession, LLMRunner.Message>, base_url?: string);
12
12
  protected streamChat(messages: string[], id_session: string | null, stream: Readable, ac: AbortController): Promise<void>;
13
13
  protected chat(messages: string[], id_session: string | null): Promise<string>;
14
14
  }
@@ -26,9 +26,9 @@ const llm_runner_1 = require("../base/llm-runner");
26
26
  * Chat GPT Implementation
27
27
  */
28
28
  class ChatGPTLLM extends llm_runner_1.LLMRunner.BaseLLM {
29
- constructor(api_key, model, chat_session_manager) {
29
+ constructor(api_key, model, chat_session_manager, base_url) {
30
30
  super(chat_session_manager !== null && chat_session_manager !== void 0 ? chat_session_manager : new llm_runner_1.LLMRunner.SessionManager());
31
- this.cgpt = new openai_1.default({ apiKey: api_key });
31
+ this.cgpt = new openai_1.default({ apiKey: api_key, baseURL: base_url });
32
32
  this.model = model;
33
33
  }
34
34
  streamChat(messages, id_session, stream, ac) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graf-research/llm-runner",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "rm -rf dist && tsc",