mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
fix: integration
This commit is contained in:
@@ -658,6 +658,9 @@ def generate_ollama_embeddings(
|
||||
form_data: GenerateEmbeddingsForm,
|
||||
url_idx: Optional[int] = None,
|
||||
):
|
||||
|
||||
log.info("generate_ollama_embeddings", form_data)
|
||||
|
||||
if url_idx == None:
|
||||
model = form_data.model
|
||||
|
||||
@@ -685,6 +688,8 @@ def generate_ollama_embeddings(
|
||||
|
||||
data = r.json()
|
||||
|
||||
log.info("generate_ollama_embeddings", data)
|
||||
|
||||
if "embedding" in data:
|
||||
return data["embedding"]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user