muhammadnasar commited on
Commit
0370b8f
·
1 Parent(s): adeca1f

Update bot.py

Browse files
Files changed (1) hide show
  1. bot.py +8 -8
bot.py CHANGED
@@ -46,13 +46,13 @@ class supertec_bot:
46
 
47
  self.client = openai.OpenAI(api_key=os.environ['openai_api_key'])
48
  print(self.client)
49
- # Step 1: Create an Assistant
50
- # self.assistant = self.client.beta.assistants.create(
51
- # name="library Support Chatbot",
52
- # instructions="You are a personal Supertech support chatbot.",
53
- # tools=[function_balance],
54
- # model="gpt-3.5-turbo",
55
- # )
56
 
57
 
58
 
@@ -72,7 +72,7 @@ class supertec_bot:
72
  # Step 4: Run the Assistant
73
  run = self.client.beta.threads.runs.create(
74
  thread_id=thread.id,
75
- assistant_id="asst_tbdEcvmCNA4uFRPcxyVt8KNR",
76
  instructions=""
77
  )
78
  answer = None
 
46
 
47
  self.client = openai.OpenAI(api_key=os.environ['openai_api_key'])
48
  print(self.client)
49
+ Step 1: Create an Assistant
50
+ self.assistant = self.client.beta.assistants.create(
51
+ name="library Support Chatbot",
52
+ instructions="You are a a personal supertec chatbot that's highly tech-oriented and a part of the Rehan Foundation. Your primary job is to respond to user queries.",
53
+ tools=[function_balance],
54
+ model="gpt-3.5-turbo",
55
+ )
56
 
57
 
58
 
 
72
  # Step 4: Run the Assistant
73
  run = self.client.beta.threads.runs.create(
74
  thread_id=thread.id,
75
+ assistant_id="self.assistant",
76
  instructions=""
77
  )
78
  answer = None