mhtkmr commited on
Commit
cab3224
·
verified ·
1 Parent(s): 460fd12

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. app.py +1 -11
  3. uv.lock +0 -0
.gitignore CHANGED
@@ -3,6 +3,7 @@ community_contributions\
3
  *.ipynb
4
  *.json
5
  *.csv
 
6
  *.pdf
7
  *.docx
8
  *.doc
 
3
  *.ipynb
4
  *.json
5
  *.csv
6
+ *.txt
7
  *.pdf
8
  *.docx
9
  *.doc
app.py CHANGED
@@ -1,5 +1,3 @@
1
- from pydantic import BaseModel
2
- from typing import Optional
3
  import threading
4
  from dotenv import load_dotenv
5
  from openai import OpenAI
@@ -84,13 +82,6 @@ record_unknown_question_json = {
84
  }
85
  }
86
 
87
-
88
-
89
- class ChatResponse(BaseModel):
90
- answer: str
91
- suggest_contact: bool
92
- confidence: float
93
-
94
  tools = [{"type": "function", "function": record_user_details_json},
95
  {"type": "function", "function": record_unknown_question_json}]
96
 
@@ -256,8 +247,7 @@ class Me:
256
  response = self.groq.chat.completions.create(
257
  model=self.groq_model_name,
258
  messages=sanitized_messages,
259
- tools=tools,
260
- response_format=ChatResponse
261
  )
262
 
263
  choice = response.choices[0]
 
 
 
1
  import threading
2
  from dotenv import load_dotenv
3
  from openai import OpenAI
 
82
  }
83
  }
84
 
 
 
 
 
 
 
 
85
  tools = [{"type": "function", "function": record_user_details_json},
86
  {"type": "function", "function": record_unknown_question_json}]
87
 
 
247
  response = self.groq.chat.completions.create(
248
  model=self.groq_model_name,
249
  messages=sanitized_messages,
250
+ tools=tools
 
251
  )
252
 
253
  choice = response.choices[0]
uv.lock ADDED
The diff for this file is too large to render. See raw diff