XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

quora (poe) [gpt-4/3.5] create bot feature fix

fixed custom model not working

d0f58147
t.me/xtekky <98614666+xtekky@users.noreply.github.com>
提交于

代码差异

1 个文件 +6 -5
Modified quora/__init__.py +6 -5
@@ -67,7 +67,8 @@ class Model:
67 67
68 68 models = {
69 69 'gpt-3.5-turbo' : 'chinchilla',
70 'claude-instant-v1.0': 'a2'
70 'claude-instant-v1.0': 'a2',
71 'gpt-4': 'beaver'
71 72 }
72 73
73 74 if not handle:
@@ -230,7 +231,7 @@ class Account:
230 231 class StreamingCompletion:
231 232 def create(
232 233 model : str = 'gpt-4',
233 custom_model : str = None,
234 custom_model : bool = None,
234 235 prompt: str = 'hello world',
235 236 token : str = ''):
236 237
@@ -246,7 +247,7 @@ class StreamingCompletion:
246 247
247 248 client = PoeClient(token)
248 249
249 for chunk in client.send_message(models[model], prompt):
250 for chunk in client.send_message(_model, prompt):
250 251
251 252 yield PoeResponse({
252 253 'id' : chunk["messageId"],
@@ -285,7 +286,7 @@ class Completion:
285 286
286 287 client = PoeClient(token)
287 288
288 for chunk in client.send_message(models[model], prompt):
289 for chunk in client.send_message(_model, prompt):
289 290 pass
290 291
291 292 return PoeResponse({
@@ -304,4 +305,4 @@ class Completion:
304 305 'completion_tokens' : len(chunk["text"]),
305 306 'total_tokens' : len(prompt) + len(chunk["text"])
306 307 }
307 })
308 })