datacipen commited on
Commit
c8c853c
1 Parent(s): bd055b1

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -21,7 +21,7 @@ os.environ['HUGGINGFACEHUB_API_TOKEN'] = os.environ['HUGGINGFACEHUB_API_TOKEN']
21
  repo_id = "mistralai/Mixtral-8x7B-Instruct-v0.1"
22
 
23
  llm = HuggingFaceEndpoint(
24
- repo_id=repo_id, max_new_tokens=5000, temperature=1.0, task="text2text-generation", streaming=True
25
  )
26
  os.environ['PINECONE_API_KEY'] = os.environ['PINECONE_API_KEY']
27
  embeddings = HuggingFaceEmbeddings()
@@ -107,7 +107,7 @@ async def main(message: cl.Message):
107
  runnable = cl.user_session.get("runnable")
108
 
109
  xq = embeddings.embed_query(message.content)
110
- xc = index.query(vector=xq, filter={"categorie": {"$eq": "bibliographie-OPP-DGDIN"}},top_k=300, include_metadata=True)
111
  context_p = ""
112
  for result in xc['matches']:
113
  context_p = context_p + result['metadata']['text']
 
21
  repo_id = "mistralai/Mixtral-8x7B-Instruct-v0.1"
22
 
23
  llm = HuggingFaceEndpoint(
24
+ repo_id=repo_id, max_new_tokens=8000, temperature=1.0, task="text2text-generation", streaming=True
25
  )
26
  os.environ['PINECONE_API_KEY'] = os.environ['PINECONE_API_KEY']
27
  embeddings = HuggingFaceEmbeddings()
 
107
  runnable = cl.user_session.get("runnable")
108
 
109
  xq = embeddings.embed_query(message.content)
110
+ xc = index.query(vector=xq, filter={"categorie": {"$eq": "bibliographie-OPP-DGDIN"}},top_k=150, include_metadata=True)
111
  context_p = ""
112
  for result in xc['matches']:
113
  context_p = context_p + result['metadata']['text']