Update networks/openai_streamer.py
Browse files
networks/openai_streamer.py
CHANGED
@@ -91,9 +91,9 @@ class OpenaiRequester:
|
|
91 |
res = requests.get(
|
92 |
self.api_models,
|
93 |
headers=self.requests_headers,
|
94 |
-
|
95 |
timeout=10,
|
96 |
-
|
97 |
)
|
98 |
self.log_response(res)
|
99 |
|
@@ -102,9 +102,9 @@ class OpenaiRequester:
|
|
102 |
res = requests.post(
|
103 |
self.api_chat_requirements,
|
104 |
headers=self.requests_headers,
|
105 |
-
|
106 |
timeout=10,
|
107 |
-
|
108 |
)
|
109 |
data = res.json()
|
110 |
self.chat_requirements_token = data["token"]
|
@@ -154,9 +154,9 @@ class OpenaiRequester:
|
|
154 |
self.api_conversation,
|
155 |
headers=requests_headers,
|
156 |
json=post_data,
|
157 |
-
|
158 |
timeout=10,
|
159 |
-
|
160 |
stream=True,
|
161 |
)
|
162 |
self.log_response(res, stream=True, iter_lines=iter_lines, verbose=verbose)
|
|
|
91 |
res = requests.get(
|
92 |
self.api_models,
|
93 |
headers=self.requests_headers,
|
94 |
+
|
95 |
timeout=10,
|
96 |
+
|
97 |
)
|
98 |
self.log_response(res)
|
99 |
|
|
|
102 |
res = requests.post(
|
103 |
self.api_chat_requirements,
|
104 |
headers=self.requests_headers,
|
105 |
+
|
106 |
timeout=10,
|
107 |
+
|
108 |
)
|
109 |
data = res.json()
|
110 |
self.chat_requirements_token = data["token"]
|
|
|
154 |
self.api_conversation,
|
155 |
headers=requests_headers,
|
156 |
json=post_data,
|
157 |
+
|
158 |
timeout=10,
|
159 |
+
|
160 |
stream=True,
|
161 |
)
|
162 |
self.log_response(res, stream=True, iter_lines=iter_lines, verbose=verbose)
|