Spaces:
Running
Running
Upload 2 files
Browse files
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=
|
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=
|
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 |
|