Artin2009 commited on
Commit
12ebd07
1 Parent(s): 8f0defd

Update chain_app.py

Browse files
Files changed (1) hide show
  1. chain_app.py +38 -38
chain_app.py CHANGED
@@ -58,10 +58,10 @@ async def chat_profile():
58
  name="gpt-3.5-turbo-1106",
59
  markdown_description="OpenAI's GPT-3.5 Turbo 1106 model",
60
  ),
61
- cl.ChatProfile(
62
- name="davinci-002",
63
- markdown_description="OpenAI's Davinci-002 model",
64
- ),
65
  cl.ChatProfile(
66
  name="TTS",
67
  markdown_description="OpenAI's Text-to-Speech model",
@@ -244,28 +244,28 @@ async def on_chat_start():
244
  content="Im one of the OpenAI's models. one of the best models. i was configured by Artin Daneshvar and Sadra Noadoust, 2 iranian students to help you, how can i assist you today ? "
245
  ).send()
246
 
247
- if chat_profile == 'davinci-002':
248
- await cl.ChatSettings(
249
- [
250
- Select(
251
- id="OpenAI-Model",
252
- label="OpenAI - Model",
253
- values=["davinci-002"],
254
- initial_index=0,
255
- ),
256
- Slider(
257
- id="Temperature",
258
- label="Model Temperature",
259
- initial=0.7,
260
- min=0,
261
- max=1,
262
- step=0.1,
263
- ),
264
- ]
265
- ).send()
266
- await cl.Message(
267
- content="Im one of the OpenAI's models. i was configured by Artin Daneshvar and Sadra Noadoust, 2 iranian students to help you, how can i assist you today ? "
268
- ).send()
269
  if chat_profile == 'TTS':
270
  await cl.Message(
271
  content="Im TTS. of the best models OpenAI ever created. i can convert text to speech! . i was configured by Artin Daneshvar and Sadra Noadoust, 2 iranian students to help you, how can i assist you today ? "
@@ -505,18 +505,18 @@ async def main(message: cl.Message):
505
  await cl.Message(
506
  content=model_response
507
  ).send()
508
- elif chat_profile == 'davinci-002':
509
- completion = openai_client.chat.completions.create(
510
- model="davinci-002",
511
- messages=[
512
- {"role": "system", "content": "You are neural nexus official chatbot, you are made by Artin Daneshvar and Sadra Noadoust"},
513
- {"role": "user", "content": message.content}
514
- ]
515
- )
516
- model_response = completion.choices[0].message.content
517
- await cl.Message(
518
- content=model_response
519
- ).send()
520
 
521
  elif chat_profile == 'TTS':
522
  response = openai_client.audio.speech.create(
 
58
  name="gpt-3.5-turbo-1106",
59
  markdown_description="OpenAI's GPT-3.5 Turbo 1106 model",
60
  ),
61
+ # cl.ChatProfile(
62
+ # name="davinci-002",
63
+ # markdown_description="OpenAI's Davinci-002 model",
64
+ # ),
65
  cl.ChatProfile(
66
  name="TTS",
67
  markdown_description="OpenAI's Text-to-Speech model",
 
244
  content="Im one of the OpenAI's models. one of the best models. i was configured by Artin Daneshvar and Sadra Noadoust, 2 iranian students to help you, how can i assist you today ? "
245
  ).send()
246
 
247
+ # if chat_profile == 'davinci-002':
248
+ # await cl.ChatSettings(
249
+ # [
250
+ # Select(
251
+ # id="OpenAI-Model",
252
+ # label="OpenAI - Model",
253
+ # values=["davinci-002"],
254
+ # initial_index=0,
255
+ # ),
256
+ # Slider(
257
+ # id="Temperature",
258
+ # label="Model Temperature",
259
+ # initial=0.7,
260
+ # min=0,
261
+ # max=1,
262
+ # step=0.1,
263
+ # ),
264
+ # ]
265
+ # ).send()
266
+ # await cl.Message(
267
+ # content="Im one of the OpenAI's models. i was configured by Artin Daneshvar and Sadra Noadoust, 2 iranian students to help you, how can i assist you today ? "
268
+ # ).send()
269
  if chat_profile == 'TTS':
270
  await cl.Message(
271
  content="Im TTS. of the best models OpenAI ever created. i can convert text to speech! . i was configured by Artin Daneshvar and Sadra Noadoust, 2 iranian students to help you, how can i assist you today ? "
 
505
  await cl.Message(
506
  content=model_response
507
  ).send()
508
+ # elif chat_profile == 'davinci-002':
509
+ # completion = openai_client.chat.completions.create(
510
+ # model="davinci-002",
511
+ # messages=[
512
+ # {"role": "system", "content": "You are neural nexus official chatbot, you are made by Artin Daneshvar and Sadra Noadoust"},
513
+ # {"role": "user", "content": message.content}
514
+ # ]
515
+ # )
516
+ # model_response = completion.choices[0].message.content
517
+ # await cl.Message(
518
+ # content=model_response
519
+ # ).send()
520
 
521
  elif chat_profile == 'TTS':
522
  response = openai_client.audio.speech.create(