This commit is contained in:
hailin 2025-05-27 14:42:52 +08:00
parent ad5fb2fa7b
commit c62109c022
2 changed files with 14 additions and 14 deletions

View File

@ -184,7 +184,7 @@ export default function WorkspaceLayout({ children }: WorkspaceLayoutProps) {
includeWorkspaceInstructions: includeWorkspaceInstructions:
workspace?.include_workspace_instructions || true, workspace?.include_workspace_instructions || true,
embeddingsProvider: embeddingsProvider:
(workspace?.embeddings_provider as "openai" | "local") || "openai" (workspace?.embeddings_provider as "openai" | "local" | "bge-m3") || "bge-m3"
}) })
setLoading(false) setLoading(false)

View File

@ -54,21 +54,21 @@ export const fetchHostedModels = async (profile: Tables<"profiles">) => {
export const fetchOllamaModels = async () => { export const fetchOllamaModels = async () => {
try { try {
// const response = await fetch(
// process.env.NEXT_PUBLIC_OLLAMA_URL + "/api/tags"
// )
const response = await fetch( const response = await fetch(
process.env.NEXT_PUBLIC_OLLAMA_URL + "/api/tags", process.env.NEXT_PUBLIC_OLLAMA_URL + "/api/tags"
{
method: "GET",
headers: {
"Authorization": "Bearer token-abc123",
"Content-Type": "application/json"
}
}
) )
// const response = await fetch(
// process.env.NEXT_PUBLIC_OLLAMA_URL + "/api/tags",
// {
// method: "GET",
// headers: {
// "Authorization": "Bearer token-abc123",
// "Content-Type": "application/json"
// }
// }
// )
if (!response.ok) { if (!response.ok) {
throw new Error(`LLM server is not responding.`) throw new Error(`LLM server is not responding.`)
} }