Update main.py
Browse files
main.py
CHANGED
@@ -437,9 +437,12 @@ async def start():
|
|
437 |
# temperature=1.0,
|
438 |
# streaming=True
|
439 |
#)
|
440 |
-
from
|
441 |
-
|
442 |
-
|
|
|
|
|
|
|
443 |
if not cl.user_session.get("saveMemory"):
|
444 |
cl.user_session.set("saveMemory", "")
|
445 |
cl.user_session.set("memory", ConversationBufferMemory(return_messages=True))
|
|
|
437 |
# temperature=1.0,
|
438 |
# streaming=True
|
439 |
#)
|
440 |
+
from langchain_huggingface.llms import HuggingFacePipeline
|
441 |
+
model = HuggingFacePipeline.from_model_id(
|
442 |
+
model_id="mistralai/Mistral-Small-Instruct-2409",
|
443 |
+
task="text-generation",
|
444 |
+
pipeline_kwargs={"max_new_tokens": 10},
|
445 |
+
)
|
446 |
if not cl.user_session.get("saveMemory"):
|
447 |
cl.user_session.set("saveMemory", "")
|
448 |
cl.user_session.set("memory", ConversationBufferMemory(return_messages=True))
|