Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -87,11 +87,11 @@ def main():
|
|
| 87 |
response = openai.chat.completions.create(
|
| 88 |
model=self.model_name,
|
| 89 |
messages=history,
|
| 90 |
-
extra_body=
|
| 91 |
extra_headers={
|
| 92 |
-
"apikey":
|
| 93 |
},
|
| 94 |
-
stream=
|
| 95 |
temperature=0.7,
|
| 96 |
top_p=1.0,
|
| 97 |
)
|
|
@@ -105,7 +105,7 @@ def main():
|
|
| 105 |
|
| 106 |
# 页面布局
|
| 107 |
|
| 108 |
-
with gr.Blocks(
|
| 109 |
with gr.Row():
|
| 110 |
with gr.Column(scale=4):
|
| 111 |
chatbot = gr.Chatbot(elem_id="chatbot", bubble_full_width=True, type="messages")
|
|
|
|
| 87 |
response = openai.chat.completions.create(
|
| 88 |
model=self.model_name,
|
| 89 |
messages=history,
|
| 90 |
+
extra_body={},
|
| 91 |
extra_headers={
|
| 92 |
+
"apikey": "empty"
|
| 93 |
},
|
| 94 |
+
stream=True,
|
| 95 |
temperature=0.7,
|
| 96 |
top_p=1.0,
|
| 97 |
)
|
|
|
|
| 105 |
|
| 106 |
# 页面布局
|
| 107 |
|
| 108 |
+
with gr.Blocks() as demo:
|
| 109 |
with gr.Row():
|
| 110 |
with gr.Column(scale=4):
|
| 111 |
chatbot = gr.Chatbot(elem_id="chatbot", bubble_full_width=True, type="messages")
|