Update app.py
Browse files
app.py
CHANGED
@@ -120,7 +120,7 @@ def create_directory_loader(file_type, directory_path):
|
|
120 |
#die Inhalte splitten, um in Vektordatenbank entsprechend zu laden als Splits
|
121 |
def document_loading_splitting():
|
122 |
global splittet
|
123 |
-
|
124 |
##############################
|
125 |
# Document loading
|
126 |
docs = []
|
@@ -287,7 +287,7 @@ def invoke (prompt, history, openai_api_key, rag_option, temperature=0.9, max_ne
|
|
287 |
#LLM auswählen (OpenAI oder HF)
|
288 |
###########################
|
289 |
#Anfrage an OpenAI
|
290 |
-
llm = ChatOpenAI(model_name = MODEL_NAME, openai_api_key = openai_api_key, temperature=
|
291 |
#oder an Hugging Face
|
292 |
#llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0.5, "max_length": 64})
|
293 |
#llm = HuggingFaceHub(url_??? = "https://wdgsjd6zf201mufn.us-east-1.aws.endpoints.huggingface.cloud", model_kwargs={"temperature": 0.5, "max_length": 64})
|
@@ -296,6 +296,7 @@ def invoke (prompt, history, openai_api_key, rag_option, temperature=0.9, max_ne
|
|
296 |
if (rag_option == "Chroma"):
|
297 |
#muss nur einmal ausgeführt werden...
|
298 |
if not splittet:
|
|
|
299 |
splits = document_loading_splitting()
|
300 |
document_storage_chroma(splits)
|
301 |
db = document_retrieval_chroma(llm, history_text_und_prompt)
|
|
|
120 |
#die Inhalte splitten, um in Vektordatenbank entsprechend zu laden als Splits
|
121 |
def document_loading_splitting():
|
122 |
global splittet
|
123 |
+
print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
|
124 |
##############################
|
125 |
# Document loading
|
126 |
docs = []
|
|
|
287 |
#LLM auswählen (OpenAI oder HF)
|
288 |
###########################
|
289 |
#Anfrage an OpenAI
|
290 |
+
llm = ChatOpenAI(model_name = MODEL_NAME, openai_api_key = openai_api_key, temperature=temperature)#, top_p = top_p)
|
291 |
#oder an Hugging Face
|
292 |
#llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0.5, "max_length": 64})
|
293 |
#llm = HuggingFaceHub(url_??? = "https://wdgsjd6zf201mufn.us-east-1.aws.endpoints.huggingface.cloud", model_kwargs={"temperature": 0.5, "max_length": 64})
|
|
|
296 |
if (rag_option == "Chroma"):
|
297 |
#muss nur einmal ausgeführt werden...
|
298 |
if not splittet:
|
299 |
+
print("bbbbbbbbbbbbbbbbbbbbb")
|
300 |
splits = document_loading_splitting()
|
301 |
document_storage_chroma(splits)
|
302 |
db = document_retrieval_chroma(llm, history_text_und_prompt)
|