Add vision support (#4076)

This commit is contained in:
TheRam_
2024-02-20 18:04:32 +08:00
committed by GitHub
parent 05b6d989b6
commit e2da3406d2
16 changed files with 650 additions and 73 deletions

View File

@@ -88,6 +88,7 @@ export const Azure = {
export const Google = {
ExampleEndpoint: "https://generativelanguage.googleapis.com/",
ChatPath: "v1beta/models/gemini-pro:generateContent",
VisionChatPath: "v1beta/models/gemini-pro-vision:generateContent",
// /api/openai/v1/chat/completions
};
@@ -103,6 +104,7 @@ Latex block: $$e=mc^2$$
`;
export const SUMMARIZE_MODEL = "gpt-3.5-turbo";
export const GEMINI_SUMMARIZE_MODEL = "gemini-pro";
export const KnowledgeCutOffDate: Record<string, string> = {
default: "2021-09",
@@ -278,6 +280,15 @@ export const DEFAULT_MODELS = [
providerType: "google",
},
},
{
name: "gemini-pro-vision",
available: true,
provider: {
id: "google",
providerName: "Google",
providerType: "google",
},
},
] as const;
export const CHAT_PAGE_SIZE = 15;