mirror of
https://github.com/open-webui/open-webui
synced 2024-11-28 06:53:14 +00:00
fix
This commit is contained in:
parent
12c8257c92
commit
2e7af7bdbf
@ -893,7 +893,7 @@ def process_file(
|
|||||||
# Update the content in the file
|
# Update the content in the file
|
||||||
# Usage: /files/{file_id}/data/content/update
|
# Usage: /files/{file_id}/data/content/update
|
||||||
|
|
||||||
VECTOR_DB_CLIENT.delete(collection_name=f"file-{file.id}")
|
VECTOR_DB_CLIENT.delete_collection(collection_name=f"file-{file.id}")
|
||||||
|
|
||||||
docs = [
|
docs = [
|
||||||
Document(
|
Document(
|
||||||
@ -1015,7 +1015,7 @@ def process_file(
|
|||||||
return {
|
return {
|
||||||
"status": True,
|
"status": True,
|
||||||
"collection_name": collection_name,
|
"collection_name": collection_name,
|
||||||
"filename": file.meta.get("name", file.filename),
|
"filename": file.filename,
|
||||||
"content": text_content,
|
"content": text_content,
|
||||||
}
|
}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -483,7 +483,6 @@ def generate_ollama_batch_embeddings(
|
|||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
data = r.json()
|
data = r.json()
|
||||||
|
|
||||||
print(data)
|
|
||||||
if "embeddings" in data:
|
if "embeddings" in data:
|
||||||
return data["embeddings"]
|
return data["embeddings"]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user