mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-15 02:50:10 +01:00
Gemini Pro 1.5, API support for 2M context and new experimental model (#2031)
This commit is contained in:
parent
d4eecdef03
commit
c55ef33fce
@ -35,6 +35,7 @@ export default function GeminiLLMOptions({ settings }) {
|
|||||||
"gemini-1.0-pro",
|
"gemini-1.0-pro",
|
||||||
"gemini-1.5-pro-latest",
|
"gemini-1.5-pro-latest",
|
||||||
"gemini-1.5-flash-latest",
|
"gemini-1.5-flash-latest",
|
||||||
|
"gemini-1.5-pro-exp-0801",
|
||||||
].map((model) => {
|
].map((model) => {
|
||||||
return (
|
return (
|
||||||
<option key={model} value={model}>
|
<option key={model} value={model}>
|
||||||
|
@ -16,6 +16,7 @@ const PROVIDER_DEFAULT_MODELS = {
|
|||||||
"gemini-1.0-pro",
|
"gemini-1.0-pro",
|
||||||
"gemini-1.5-pro-latest",
|
"gemini-1.5-pro-latest",
|
||||||
"gemini-1.5-flash-latest",
|
"gemini-1.5-flash-latest",
|
||||||
|
"gemini-1.5-pro-exp-0801",
|
||||||
],
|
],
|
||||||
anthropic: [
|
anthropic: [
|
||||||
"claude-instant-1.2",
|
"claude-instant-1.2",
|
||||||
|
@ -96,7 +96,9 @@ class GeminiLLM {
|
|||||||
case "gemini-1.5-flash-latest":
|
case "gemini-1.5-flash-latest":
|
||||||
return 1_048_576;
|
return 1_048_576;
|
||||||
case "gemini-1.5-pro-latest":
|
case "gemini-1.5-pro-latest":
|
||||||
return 1_048_576;
|
return 2_097_152;
|
||||||
|
case "gemini-1.5-pro-exp-0801":
|
||||||
|
return 2_097_152;
|
||||||
default:
|
default:
|
||||||
return 30_720; // assume a gemini-pro model
|
return 30_720; // assume a gemini-pro model
|
||||||
}
|
}
|
||||||
@ -108,6 +110,7 @@ class GeminiLLM {
|
|||||||
"gemini-1.0-pro",
|
"gemini-1.0-pro",
|
||||||
"gemini-1.5-pro-latest",
|
"gemini-1.5-pro-latest",
|
||||||
"gemini-1.5-flash-latest",
|
"gemini-1.5-flash-latest",
|
||||||
|
"gemini-1.5-pro-exp-0801",
|
||||||
];
|
];
|
||||||
return validModels.includes(modelName);
|
return validModels.includes(modelName);
|
||||||
}
|
}
|
||||||
|
@ -585,6 +585,7 @@ function validGeminiModel(input = "") {
|
|||||||
"gemini-1.0-pro",
|
"gemini-1.0-pro",
|
||||||
"gemini-1.5-pro-latest",
|
"gemini-1.5-pro-latest",
|
||||||
"gemini-1.5-flash-latest",
|
"gemini-1.5-flash-latest",
|
||||||
|
"gemini-1.5-pro-exp-0801",
|
||||||
];
|
];
|
||||||
return validModels.includes(input)
|
return validModels.includes(input)
|
||||||
? null
|
? null
|
||||||
|
Loading…
Reference in New Issue
Block a user