Skip to content

Commit

Permalink
Update Gemini streaming availability
Browse files Browse the repository at this point in the history
  • Loading branch information
n4ze3m committed Mar 9, 2024
1 parent 4759853 commit bcbbdef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion server/prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const LLMS: {
model_id: "gemini-pro",
name: "Gemini Pro (Google)",
model_type: "chat",
stream_available: false,
stream_available: true,
model_provider: "Google",
local_model: false,
config: "{}",
Expand Down Expand Up @@ -469,10 +469,23 @@ const replaceOldEmbeddings = async () => {

}


const updateGeminiStreamingToTrue = async () => {
await prisma.dialoqbaseModels.update({
where: {
model_id: "gemini-pro",
},
data: {
stream_available: true,
},
});
}

const main = async () => {
await newModels();
await removeTensorflowSupport();
await replaceOldEmbeddings();
await updateGeminiStreamingToTrue()
};

main()
Expand Down
2 changes: 2 additions & 0 deletions server/src/utils/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ export const chatModelProvider = (
modelName: modelName,
maxOutputTokens: 2048,
apiKey: process.env.GOOGLE_API_KEY,
...otherFields,
});
case "ollama":
return new ChatOllama({
baseUrl: otherFields.baseURL,
model: modelName,
...otherFields,
});
case "replicate":
return new Replicate({
Expand Down

0 comments on commit bcbbdef

Please sign in to comment.