We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
So recently Gemini made their API compatible with OpenAI library. More details: https://ai.google.dev/gemini-api/docs/openai#node.js
Ideally it just requires changing the model and baseURL. I tried making the following changes in index.js from example code at https://docs.mcp.run/tutorials/mcpx-openai-node/
// change baseURL after exporting gemini key instead // const openai = new OpenAI({ apiKey: OPENAI_API_KEY }); const openai = new OpenAI({ apiKey: OPENAI_API_KEY, baseURL: "https://generativelanguage.googleapis.com/v1beta/openai/" }); // change the model let response = await mcpx.chatCompletionCreate({ model: "gemini-1.5-flash", // Select your preferred model temperature: 0, messages, });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
So recently Gemini made their API compatible with OpenAI library. More details: https://ai.google.dev/gemini-api/docs/openai#node.js
Ideally it just requires changing the model and baseURL. I tried making the following changes in index.js from example code at https://docs.mcp.run/tutorials/mcpx-openai-node/
The text was updated successfully, but these errors were encountered: