Achille Thin - Genesis commited on
Commit
79a38a9
·
1 Parent(s): 29b3888

correctign prompt

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -28,7 +28,7 @@ query_engine = None
28
 
29
  # Define LLMs
30
  llm = MistralAI(api_key=env_api_key, model=llm_model)
31
- embed_model = MistralAIEmbedding(model_name="mistral-embed", api_key=env_api_key)
32
 
33
  # create client and a new collection
34
  db = chromadb.PersistentClient(path="./chroma_db")
@@ -57,7 +57,9 @@ def create_prompt(farmSize, cultures):
57
  """
58
  for i, culture in enumerate(cultures):
59
  prompt += f"Parcel {i+1} most recently grew {culture}."
60
- prompt += "I need you to answer in French."
 
 
61
  return prompt
62
 
63
 
 
28
 
29
  # Define LLMs
30
  llm = MistralAI(api_key=env_api_key, model=llm_model)
31
+ embed_model = MistralAIEmbedding(model_name="mistral-embed", api_key=env_api_key, max_length=2000)
32
 
33
  # create client and a new collection
34
  db = chromadb.PersistentClient(path="./chroma_db")
 
57
  """
58
  for i, culture in enumerate(cultures):
59
  prompt += f"Parcel {i+1} most recently grew {culture}."
60
+ prompt += """I need you to answer in French formulating a table with the crops you want to grow and by parcel with associated surface, and predicting revenue according to the scenario asked for (mean, pessimistic or optimistic. Default: mean).
61
+ Réponds en français en formulant un tableau avec les cultures que tu veux cultiver et par parcelle avec la surface associée, et en prévoyant le revenu selon le scénario demandé (moyen, pessimiste ou optimiste. Par défaut : moyen).\n"
62
+ """
63
  return prompt
64
 
65