fix: update ollama api
This commit is contained in:
@@ -554,6 +554,8 @@ const genOllama = ({
|
||||
systemPrompt,
|
||||
userPrompt,
|
||||
model,
|
||||
temperature,
|
||||
maxTokens,
|
||||
customHeader,
|
||||
customBody,
|
||||
docInfo,
|
||||
@@ -565,9 +567,19 @@ const genOllama = ({
|
||||
|
||||
const data = {
|
||||
model,
|
||||
system: systemPrompt,
|
||||
prompt: userPrompt,
|
||||
think: think,
|
||||
messages: [
|
||||
{
|
||||
role: "system",
|
||||
content: systemPrompt,
|
||||
},
|
||||
{
|
||||
role: "user",
|
||||
content: userPrompt,
|
||||
},
|
||||
],
|
||||
temperature,
|
||||
max_tokens: maxTokens,
|
||||
think,
|
||||
stream: false,
|
||||
...customBody,
|
||||
};
|
||||
|
||||
@@ -379,7 +379,7 @@ const defaultOpenaiApi = {
|
||||
};
|
||||
const defaultOllamaApi = {
|
||||
...defaultApi,
|
||||
url: "http://localhost:11434/api/generate",
|
||||
url: "http://localhost:11434/v1/chat/completions",
|
||||
model: "llama3.1",
|
||||
};
|
||||
export const DEFAULT_TRANS_APIS = {
|
||||
|
||||
Reference in New Issue
Block a user