alexkueck commited on
Commit
59b255f
·
1 Parent(s): a79bbe3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -458,9 +458,17 @@ def generate_text (prompt, chatbot, history, rag_option, model_option, openai_ap
458
  #result = rag_chain(llm, history_text_und_prompt, db)
459
  else:
460
  #splittet = False
461
- print("LLM aufrufen ohne RAG: ...........")
462
- resulti = llm_chain(llm, history_text_und_prompt)
463
- result = resulti.strip()
 
 
 
 
 
 
 
 
464
 
465
 
466
 
 
458
  #result = rag_chain(llm, history_text_und_prompt, db)
459
  else:
460
  #splittet = False
461
+ if (model_option=="OpenAI"):
462
+ print("LLM aufrufen ohne RAG: ...........")
463
+ resulti = llm_chain(llm, history_text_und_prompt)
464
+ result = resulti.strip()
465
+ else:
466
+ data = {
467
+ "inputs": prompt,
468
+ "options": {"max_new_tokens": max_new_tokens},
469
+ }
470
+ response = requests.post(API_URL, headers=headers, json=data)
471
+ result= response.json()
472
 
473
 
474