Spaces:
Running
Running
Update rag.py
Browse files
rag.py
CHANGED
@@ -51,10 +51,11 @@ class RAG:
|
|
51 |
#{"role": "system", "content": sys_prompt },
|
52 |
{"role": "user", "content": query}
|
53 |
],
|
|
|
54 |
stream=False
|
55 |
)
|
56 |
print(chat_completion)
|
57 |
-
return(chat_completion.choices[0].
|
58 |
|
59 |
|
60 |
def beautiful_context(self, docs):
|
|
|
51 |
#{"role": "system", "content": sys_prompt },
|
52 |
{"role": "user", "content": query}
|
53 |
],
|
54 |
+
max_tokens=model_parameters['max_new_tokens'] # TODO: map other parameters
|
55 |
stream=False
|
56 |
)
|
57 |
print(chat_completion)
|
58 |
+
return(chat_completion.choices[0].message.content)
|
59 |
|
60 |
|
61 |
def beautiful_context(self, docs):
|