Update main.py
Browse files
main.py
CHANGED
@@ -19,6 +19,8 @@ from langchain.prompts import ChatPromptTemplate, MessagesPlaceholder
|
|
19 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
20 |
from langchain_pinecone import PineconeVectorStore
|
21 |
|
|
|
|
|
22 |
from offres_emploi import Api
|
23 |
from offres_emploi.utils import dt_to_str_iso
|
24 |
from langchain_community.chat_message_histories import ChatMessageHistory
|
@@ -170,7 +172,7 @@ def Connexion_Mistral():
|
|
170 |
#llm = HuggingFaceEndpoint(
|
171 |
# repo_id=repo_id, max_new_tokens=3000, temperature=0.5, top_p=0.7, task="text2text-generation", streaming=True
|
172 |
#)
|
173 |
-
llm =
|
174 |
|
175 |
return llm
|
176 |
|
|
|
19 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
20 |
from langchain_pinecone import PineconeVectorStore
|
21 |
|
22 |
+
from openai import OpenAI
|
23 |
+
|
24 |
from offres_emploi import Api
|
25 |
from offres_emploi.utils import dt_to_str_iso
|
26 |
from langchain_community.chat_message_histories import ChatMessageHistory
|
|
|
172 |
#llm = HuggingFaceEndpoint(
|
173 |
# repo_id=repo_id, max_new_tokens=3000, temperature=0.5, top_p=0.7, task="text2text-generation", streaming=True
|
174 |
#)
|
175 |
+
llm = OpenAI(model="mistralai/Mistral-Small-3.1-24B-Instruct-2503", base_url=os.environ['BASEURL_RENNES_API_KEY'], api_key=os.environ['ENDPOINT_RENNES_API_KEY'])
|
176 |
|
177 |
return llm
|
178 |
|