Skip to content

Commit

Permalink
feat: update ai models (#45)
Browse files Browse the repository at this point in the history
* feat: use gpt3.5turbo

* chore: set main gpt-3.5 turbo for auto updates

---------

Co-authored-by: aexshafii <alexandre.shafii@gmail.com>
  • Loading branch information
benjaminshafii and aexshafii authored Apr 18, 2024
1 parent a51b3f4 commit cbac7bd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/pages/api/name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default async function handler(
try {
const apiKey = process.env.OPENAI_API_KEY || "";
console.log("apiKey", apiKey)
const model = "gpt-4-turbo";
const model = "gpt-3.5-turbo";
const data = {
...req.body,
model,
Expand Down
2 changes: 1 addition & 1 deletion app/pages/api/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default async function handler(
try {
const apiKey = process.env.OPENAI_API_KEY || "";

const model = "gpt-4-turbo";
const model = "gpt-3.5-turbo";
const data = {
...req.body,
model,
Expand Down
2 changes: 1 addition & 1 deletion app/pages/api/vision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default async function handler(
const payload = req.body;
console.log("payload text route", payload);

const model = "gpt-4-vision-preview";
const model = "gpt-4-turbo";

const data = {
...payload,
Expand Down
4 changes: 2 additions & 2 deletions src/modules/name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { logMessage } from "../../utils";

async function useName(document, { baseUrl, apiKey }) {
const data = {
model: "gpt-4-1106-preview",
model: "gpt-3.5-turbo",
messages: [
{
role: "system",
Expand All @@ -16,9 +16,9 @@ async function useName(document, { baseUrl, apiKey }) {
},
],
};
logMessage("Using gpt-3.5-turbo-0125");
const endpoint = "api/name";
const url = `${baseUrl}/${endpoint}`;
console.log(url);
const response = await requestUrl({
url: url,
method: "POST",
Expand Down

0 comments on commit cbac7bd

Please sign in to comment.