mirror of
https://github.com/open-webui/open-webui
synced 2024-11-26 14:02:29 +00:00
chore: commented code removed
This commit is contained in:
parent
3e5208c11e
commit
0b1abf1643
@ -106,7 +106,6 @@
|
||||
const sendPromptOllama = async (model, userPrompt, parentId, _chatId) => {
|
||||
console.log('sendPromptOllama');
|
||||
let responseMessageId = uuidv4();
|
||||
|
||||
let responseMessage = {
|
||||
parentId: parentId,
|
||||
id: responseMessageId,
|
||||
@ -126,38 +125,8 @@
|
||||
}
|
||||
|
||||
await tick();
|
||||
|
||||
window.scrollTo({ top: document.body.scrollHeight });
|
||||
|
||||
// const res = await fetch(`${$settings?.API_BASE_URL ?? OLLAMA_API_BASE_URL}/generate`, {
|
||||
// method: 'POST',
|
||||
// headers: {
|
||||
// 'Content-Type': 'text/event-stream',
|
||||
// ...($settings.authHeader && { Authorization: $settings.authHeader }),
|
||||
// ...($user && { Authorization: `Bearer ${localStorage.token}` })
|
||||
// },
|
||||
// body: JSON.stringify({
|
||||
// model: model,
|
||||
// prompt: userPrompt,
|
||||
// system: $settings.system ?? undefined,
|
||||
// options: {
|
||||
// seed: $settings.seed ?? undefined,
|
||||
// temperature: $settings.temperature ?? undefined,
|
||||
// repeat_penalty: $settings.repeat_penalty ?? undefined,
|
||||
// top_k: $settings.top_k ?? undefined,
|
||||
// top_p: $settings.top_p ?? undefined,
|
||||
// num_ctx: $settings.num_ctx ?? undefined,
|
||||
// ...($settings.options ?? {})
|
||||
// },
|
||||
// format: $settings.requestFormat ?? undefined,
|
||||
// context:
|
||||
// history.messages[parentId] !== null &&
|
||||
// history.messages[parentId].parentId in history.messages
|
||||
// ? history.messages[history.messages[parentId].parentId]?.context ?? undefined
|
||||
// : undefined
|
||||
// })
|
||||
// });
|
||||
|
||||
const res = await fetch(`${$settings?.API_BASE_URL ?? OLLAMA_API_BASE_URL}/chat`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
@ -133,7 +133,6 @@
|
||||
const sendPromptOllama = async (model, userPrompt, parentId, _chatId) => {
|
||||
console.log('sendPromptOllama');
|
||||
let responseMessageId = uuidv4();
|
||||
|
||||
let responseMessage = {
|
||||
parentId: parentId,
|
||||
id: responseMessageId,
|
||||
@ -153,38 +152,8 @@
|
||||
}
|
||||
|
||||
await tick();
|
||||
|
||||
window.scrollTo({ top: document.body.scrollHeight });
|
||||
|
||||
// const res = await fetch(`${$settings?.API_BASE_URL ?? OLLAMA_API_BASE_URL}/generate`, {
|
||||
// method: 'POST',
|
||||
// headers: {
|
||||
// 'Content-Type': 'text/event-stream',
|
||||
// ...($settings.authHeader && { Authorization: $settings.authHeader }),
|
||||
// ...($user && { Authorization: `Bearer ${localStorage.token}` })
|
||||
// },
|
||||
// body: JSON.stringify({
|
||||
// model: model,
|
||||
// prompt: userPrompt,
|
||||
// system: $settings.system ?? undefined,
|
||||
// options: {
|
||||
// seed: $settings.seed ?? undefined,
|
||||
// temperature: $settings.temperature ?? undefined,
|
||||
// repeat_penalty: $settings.repeat_penalty ?? undefined,
|
||||
// top_k: $settings.top_k ?? undefined,
|
||||
// top_p: $settings.top_p ?? undefined,
|
||||
// num_ctx: $settings.num_ctx ?? undefined,
|
||||
// ...($settings.options ?? {})
|
||||
// },
|
||||
// format: $settings.requestFormat ?? undefined,
|
||||
// context:
|
||||
// history.messages[parentId] !== null &&
|
||||
// history.messages[parentId].parentId in history.messages
|
||||
// ? history.messages[history.messages[parentId].parentId]?.context ?? undefined
|
||||
// : undefined
|
||||
// })
|
||||
// });
|
||||
|
||||
const res = await fetch(`${$settings?.API_BASE_URL ?? OLLAMA_API_BASE_URL}/chat`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
Loading…
Reference in New Issue
Block a user