mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
improves interoperability of model providers, local and remote providers can be used together seemlessly
This commit is contained in:

committed by
Geoff Seemueller

parent
ad7dc5c0a6
commit
f29bb6779c
@@ -1,8 +1,8 @@
|
||||
import {OpenAI} from "openai";
|
||||
import Message from "../models/Message.ts";
|
||||
import {AssistantSdk} from "./assistant-sdk.ts";
|
||||
import {getModelFamily} from "@open-gsio/ai/supported-models.ts";
|
||||
import type {Instance} from "mobx-state-tree";
|
||||
import {ProviderRepository} from "../providers/_ProviderRepository";
|
||||
|
||||
export class ChatSdk {
|
||||
static async preprocess({
|
||||
@@ -95,9 +95,10 @@ export class ChatSdk {
|
||||
assistantPrompt: string;
|
||||
toolResults: Instance<typeof Message>;
|
||||
model: any;
|
||||
env: Env;
|
||||
},
|
||||
) {
|
||||
const modelFamily = getModelFamily(opts.model);
|
||||
const modelFamily = ProviderRepository.getModelFamily(opts.model, opts.env)
|
||||
|
||||
const messagesToSend = [];
|
||||
|
||||
|
Reference in New Issue
Block a user