You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

11 months ago
  1. const { MODEL_MAP } = require("../modelMap");
  2. const stableModels = [
  3. "gemini-pro",
  4. "gemini-1.0-pro",
  5. "gemini-1.5-pro-latest",
  6. "gemini-1.5-flash-latest",
  7. ];
  8. const experimentalModels = [
  9. "gemini-1.5-pro-exp-0801",
  10. "gemini-1.5-pro-exp-0827",
  11. "gemini-1.5-flash-exp-0827",
  12. "gemini-1.5-flash-8b-exp-0827",
  13. "gemini-exp-1114",
  14. "gemini-exp-1121",
  15. "gemini-exp-1206",
  16. "learnlm-1.5-pro-experimental",
  17. "gemini-2.0-flash-exp",
  18. ];
  19. // There are some models that are only available in the v1beta API
  20. // and some models that are only available in the v1 API
  21. // generally, v1beta models have `exp` in the name, but not always
  22. // so we check for both against a static list as well.
  23. const v1BetaModels = ["gemini-1.5-pro-latest", "gemini-1.5-flash-latest"];
  24. const defaultGeminiModels = [
  25. ...stableModels.map((model) => ({
  26. id: model,
  27. name: model,
  28. contextWindow: MODEL_MAP.gemini[model],
  29. experimental: false,
  30. })),
  31. ...experimentalModels.map((model) => ({
  32. id: model,
  33. name: model,
  34. contextWindow: MODEL_MAP.gemini[model],
  35. experimental: true,
  36. })),
  37. ];
  38. module.exports = {
  39. defaultGeminiModels,
  40. v1BetaModels,
  41. };