feat: RAG text ingestion(store) api

This commit is contained in:
Timothy J. Baek 2024-03-24 00:40:27 -07:00
parent c2d6d3230b
commit 7e0ea8f77d
2 changed files with 79 additions and 33 deletions

View file

@ -137,6 +137,8 @@ def rag_messages(docs, messages, template, k, embedding_function):
k=k,
embedding_function=embedding_function,
)
elif doc["type"] == "text":
context = doc["content"]
else:
context = query_doc(
collection_name=doc["collection_name"],