Skip to content

Commit

Permalink
chore: update models
Browse files Browse the repository at this point in the history
  • Loading branch information
xyTom committed Aug 2, 2024
1 parent c680c57 commit 7f95f80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/renderer/models/model-gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const requestOptions: RequestInit = {
redirect: "follow" as RequestRedirect // Fix the type mismatch error by explicitly casting the value to RequestRedirect type
};

const response = await fetch("https://s.global.ssl.fastly.net/v1/models/gemini-1.0-pro-vision-latest:generateContent", requestOptions);
const response = await fetch("https://s.global.ssl.fastly.net/v1beta/models/gemini-1.5-pro:generateContent", requestOptions);
const result = await response.json();
return result["candidates"][0]["content"]["parts"][0]["text"];
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/models/model-gpt4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ async function GPT(image:string, prompt:string, APIKey:string): Promise<string>
myHeaders.append("authorization", `Bearer ${APIKey}`);
myHeaders.append("content-type", "application/json");
const raw = JSON.stringify({
"model": "gpt-4-vision-preview",
"model": "gpt-4o",
"messages": [
{
"role": "user",
Expand Down

0 comments on commit 7f95f80

Please sign in to comment.