alexkueck commited on
Commit
051d55e
1 Parent(s): 01d87d4

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -2
utils.py CHANGED
@@ -405,8 +405,10 @@ def rag_chain(llm, prompt, retriever):
405
  #answer = query(llm, {"inputs": input_text,})
406
 
407
  #3. Alternative: mit pipeline
408
- messages = [{"role": "user", "content": input_text},]
409
- answer = llm(messages)
 
 
410
 
411
  # Erstelle das Ergebnis-Dictionary
412
  result = {
 
405
  #answer = query(llm, {"inputs": input_text,})
406
 
407
  #3. Alternative: mit pipeline
408
+ #für text-generation:
409
+ #messages = [{"role": "user", "content": input_text},]
410
+ #für summarizatiuon
411
+ answer = llm(input_text, max_length=512, min_length=150, do_sample=False)
412
 
413
  # Erstelle das Ergebnis-Dictionary
414
  result = {