mhtkmr commited on
Commit
290f2fb
·
verified ·
1 Parent(s): 3bc60d3

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -122,7 +122,7 @@ class Me:
122
  # self.gemini = OpenAI(api_key=os.getenv("GOOGLE_API_KEY"), base_url="https://generativelanguage.googleapis.com/v1beta/openai/")
123
  self.groq = OpenAI(api_key=os.getenv("GROQ_API_KEY"), base_url="https://api.groq.com/openai/v1")
124
  self.groq_model_name = "llama-3.1-8b-instant"
125
- self.cur_model = 'groq'
126
  self.name = "Mohit Kumar"
127
  self.linkedin = load_pdf_with_cache("me/mkt_v1_2pg.pdf")
128
  print("Loading FAISS vector store...")
@@ -210,7 +210,7 @@ class Me:
210
  # system_prompt += f"\n\n## Summary:\n{self.summary}\n\n## LinkedIn Profile:\n{self.linkedin}\n\n## Resume:\n{self.resume}\n\n"
211
  # Add the retrieved context to the prompt
212
  system_prompt += f"\n\n## RELEVANT CONTEXT:\n{retrieved_context}\n\n"
213
- system_prompt += f"With this context, please chat with the user, always staying in character as {self.name}. If you do not have context for the question, say you don't know and use the 'record_unknown_question' tool to record the question."
214
  return system_prompt
215
 
216
  def chat(self, message, history):
 
122
  # self.gemini = OpenAI(api_key=os.getenv("GOOGLE_API_KEY"), base_url="https://generativelanguage.googleapis.com/v1beta/openai/")
123
  self.groq = OpenAI(api_key=os.getenv("GROQ_API_KEY"), base_url="https://api.groq.com/openai/v1")
124
  self.groq_model_name = "llama-3.1-8b-instant"
125
+ self.cur_model = 'gpt'
126
  self.name = "Mohit Kumar"
127
  self.linkedin = load_pdf_with_cache("me/mkt_v1_2pg.pdf")
128
  print("Loading FAISS vector store...")
 
210
  # system_prompt += f"\n\n## Summary:\n{self.summary}\n\n## LinkedIn Profile:\n{self.linkedin}\n\n## Resume:\n{self.resume}\n\n"
211
  # Add the retrieved context to the prompt
212
  system_prompt += f"\n\n## RELEVANT CONTEXT:\n{retrieved_context}\n\n"
213
+ system_prompt += f"With this context only, please chat with the user, always staying in character as {self.name}. If you do not have context for the question, say you don't know and use the 'record_unknown_question' tool to record the question."
214
  return system_prompt
215
 
216
  def chat(self, message, history):