Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling all models with a unified vendor #8335

Open
yanlinwei45 opened this issue Mar 25, 2025 · 0 comments
Open

Calling all models with a unified vendor #8335

yanlinwei45 opened this issue Mar 25, 2025 · 0 comments

Comments

@yanlinwei45
Copy link

I want to change to a unified manufacturer LLMProvider

Can be found in the file app/lib/.server/llm/stream-text.ts

Replace StreamText with the following code:

export function streamText(messages: Messages, env: Env, options?: StreamingOptions) {
let config = getAnthropicModel('claude-3-5-sonnet-20240620');
config.config.baseURL = 'https://platform.llmprovider.ai/v1'
return _streamText({
model: config,
system: getSystemPrompt(),
maxTokens: MAX_TOKENS,
headers: {
"Authorization":"Bearer api-key"
},
messages: convertToCoreMessages(messages),
...options,
});
}

@yanlinwei45 yanlinwei45 changed the title I want to use a manufacturer other than the official, Calling all models with a unified vendor Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant