forked from open-webui/open-webui
fix: integration
This commit is contained in:
parent
9cdb5bf9fe
commit
36ce157907
3 changed files with 28 additions and 7 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue