Spaces:
Paused
Paused
Daniel Marques
commited on
Commit
·
d7147ea
1
Parent(s):
911d720
feat: add websocket
Browse files- main.py +0 -4
- prompt_template_utils.py +1 -1
main.py
CHANGED
@@ -274,10 +274,6 @@ async def websocket_endpoint_room(websocket: WebSocket, room_id: str, user_id: s
|
|
274 |
chain_type_kwargs={
|
275 |
"prompt": prompt,
|
276 |
"memory": memory,
|
277 |
-
"n_ctx": CONTEXT_WINDOW_SIZE,
|
278 |
-
"max_tokens": MAX_NEW_TOKENS,
|
279 |
-
"n_batch": MAX_NEW_TOKENS,
|
280 |
-
|
281 |
},
|
282 |
)
|
283 |
|
|
|
274 |
chain_type_kwargs={
|
275 |
"prompt": prompt,
|
276 |
"memory": memory,
|
|
|
|
|
|
|
|
|
277 |
},
|
278 |
)
|
279 |
|
prompt_template_utils.py
CHANGED
@@ -85,7 +85,7 @@ def get_prompt_template(system_prompt=system_prompt, promptTemplate_type=None, h
|
|
85 |
)
|
86 |
prompt = PromptTemplate(input_variables=["context", "question"], template=prompt_template)
|
87 |
|
88 |
-
memory = ConversationBufferMemory(input_key="question", memory_key="history")
|
89 |
|
90 |
return (
|
91 |
prompt,
|
|
|
85 |
)
|
86 |
prompt = PromptTemplate(input_variables=["context", "question"], template=prompt_template)
|
87 |
|
88 |
+
memory = ConversationBufferMemory(input_key="question", memory_key="history", max_token_limit=10)
|
89 |
|
90 |
return (
|
91 |
prompt,
|