improves interoperability of model providers, local and remote providers can be used together seemlessly

This commit is contained in:
geoffsee
2025-06-09 13:54:37 -04:00
committed by Geoff Seemueller
parent ad7dc5c0a6
commit f29bb6779c
14 changed files with 526 additions and 234 deletions

View File

@@ -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 = [];