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

Custom Anthropic baseURL can't response output result #54

Open
pzc163 opened this issue Sep 6, 2024 · 3 comments
Open

Custom Anthropic baseURL can't response output result #54

pzc163 opened this issue Sep 6, 2024 · 3 comments

Comments

@pzc163
Copy link

pzc163 commented Sep 6, 2024

in models.ts I change the anthropic and openai's baseURL as below shown:

export function getModelClient(model: LLMModel, config: LLMModelConfig) {
const { id: modelNameString, providerId } = model
const { apiKey, baseURL } = config

const providerConfigs = {
anthropic: () => createOpenAI({ apiKey: apiKey || process.env.ANTHROPIC_API_KEY, baseURL: 'https://api.xhub.chat/v1' })(modelNameString),
openai: () => createOpenAI({ apiKey: apiKey || process.env.OPENAI_API_KEY, baseURL: 'https://api.xhub.chat/v1' })(modelNameString),

The application can run and the LLM response can be seen. But it won't give me back the result of running the code and can't preview. The log shows:

model {
id: 'claude-3-5-sonnet-20240620',
provider: 'Anthropic',
providerId: 'anthropic',
name: 'Claude 3.5 Sonnet',
multiModal: true
}
config { model: 'claude-3-5-sonnet-20240620' }
POST /api/chat 200 in 31541ms

I don't have a default anthropic API Keys, so how can i do to solve this problem?

Copy link

linear bot commented Sep 6, 2024

@mishushakov
Copy link
Member

Have you set your E2B_API_KEY in environment variable?

@pzc163
Copy link
Author

pzc163 commented Sep 7, 2024

Have you set your E2B_API_KEY in environment variable?

Yes,E2B_API_KEY has been set already

@ValentaTomas ValentaTomas changed the title custom Anthropic baseURL can't response output result Custom Anthropic baseURL can't response output result Sep 9, 2024
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

2 participants