Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cocktailpeanut committed Apr 27, 2024
1 parent 4e8ec85 commit 286c89d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions convex/util/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ export async function chatCompletion(
// OLLAMA_MODEL is legacy
body.model =
body.model ?? process.env.LLM_MODEL ?? process.env.OLLAMA_MODEL ?? LLM_CONFIG.chatModel;
console.log("process.env", "LLM_MODEL", process.env.LLM_MODEL, "OLLAMA_MODEL", process.env.OLLAMA_MODEL)
console.log("body.model = ", body.model)


const stopWords = body.stop ? (typeof body.stop === 'string' ? [body.stop] : body.stop) : [];
if (LLM_CONFIG.ollama) stopWords.push('<|eot_id|>');
console.log(body);
const {
result: content,
retries,
Expand All @@ -99,7 +101,6 @@ export async function chatCompletion(

body: JSON.stringify(body),
});
console.log("result", result)
if (!result.ok) {
const error = await result.text();
console.error({ error });
Expand Down

0 comments on commit 286c89d

Please sign in to comment.