randydev commited on
Commit
da2c06c
1 Parent(s): 5d77efe

Upload 2 files

Browse files
Files changed (2) hide show
  1. main.py +2 -2
  2. models.py +2 -0
main.py CHANGED
@@ -632,7 +632,7 @@ def chatgpt3_turbo(item: Chatgpt3Texts):
632
  GPTbase = SOURCE_OPENAI_ACCESS_URL
633
  response = OpenAiToken(api_key=item.api_key, api_base=GPTbase).chat_message_turbo(
634
  query=item.query,
635
- model="gpt-3.5-turbo",
636
  is_stream=item.is_stream
637
  )
638
  answer = response[0]
@@ -668,7 +668,7 @@ def chatgpt4_turbo(
668
  GPTbase = SOURCE_OPENAI_ACCESS_URL
669
  response = OpenAiToken(api_key=item.api_key, api_base=GPTbase).chat_message_turbo(
670
  query=item.query,
671
- model="gpt-4",
672
  is_stream=item.is_stream
673
  )
674
  answer = response[0]
 
632
  GPTbase = SOURCE_OPENAI_ACCESS_URL
633
  response = OpenAiToken(api_key=item.api_key, api_base=GPTbase).chat_message_turbo(
634
  query=item.query,
635
+ model=item.model,
636
  is_stream=item.is_stream
637
  )
638
  answer = response[0]
 
668
  GPTbase = SOURCE_OPENAI_ACCESS_URL
669
  response = OpenAiToken(api_key=item.api_key, api_base=GPTbase).chat_message_turbo(
670
  query=item.query,
671
+ model=item.model,
672
  is_stream=item.is_stream
673
  )
674
  answer = response[0]
models.py CHANGED
@@ -135,11 +135,13 @@ class AnimeStyled(BaseModel):
135
  class OpenaiTexts(BaseModel):
136
  query: str
137
  api_key: Optional[str] = ""
 
138
  is_stream: Optional[bool] = False
139
 
140
  class Chatgpt3Texts(BaseModel):
141
  query: str
142
  api_key: Optional[str] = ""
 
143
  is_stream: Optional[bool] = False
144
  is_openai_original: Optional[bool] = False
145
 
 
135
  class OpenaiTexts(BaseModel):
136
  query: str
137
  api_key: Optional[str] = ""
138
+ model: Optional[str] = "gpt-4"
139
  is_stream: Optional[bool] = False
140
 
141
  class Chatgpt3Texts(BaseModel):
142
  query: str
143
  api_key: Optional[str] = ""
144
+ model: Optional[str] = "gpt-3.5-turbo"
145
  is_stream: Optional[bool] = False
146
  is_openai_original: Optional[bool] = False
147