From b206a1eb6364e519741ceb89e3f3b63910b4e1ef Mon Sep 17 00:00:00 2001 From: Raju Komati Date: Fri, 28 Apr 2023 02:27:06 +0530 Subject: update openai_rev module add test file with simple use --- openai_rev/quora/__init__.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'openai_rev/quora/__init__.py') diff --git a/openai_rev/quora/__init__.py b/openai_rev/quora/__init__.py index f5d9e96e..5303f206 100644 --- a/openai_rev/quora/__init__.py +++ b/openai_rev/quora/__init__.py @@ -108,11 +108,6 @@ class Model: description: str = 'gpt-3.5 language model from openai, skidded by poe.com', handle: str = None, ) -> ModelResponse: - models = { - 'gpt-3.5-turbo': 'chinchilla', - 'claude-instant-v1.0': 'a2', - 'gpt-4': 'beaver', - } if not handle: handle = f'gptx{randint(1111111, 9999999)}' @@ -148,7 +143,7 @@ class Model: obj={ 'queryName': 'CreateBotMain_poeBotCreate_Mutation', 'variables': { - 'model': models[model], + 'model': MODELS[model], 'handle': handle, 'prompt': system_prompt, 'isPromptPublic': True, @@ -337,15 +332,7 @@ class Completion: prompt: str = 'hello world', token: str = '', ) -> PoeResponse: - models = { - 'sage': 'capybara', - 'gpt-4': 'beaver', - 'claude-v1.2': 'a2_2', - 'claude-instant-v1.0': 'a2', - 'gpt-3.5-turbo': 'chinchilla', - } - - _model = models[model] if not custom_model else custom_model + _model = MODELS[model] if not custom_model else custom_model client = PoeClient(token) @@ -359,7 +346,7 @@ class Completion: 'object': 'text_completion', 'created': chunk['creationTime'], 'model': _model, - 'text': chunk['text_new'], + 'text': chunk['text'], 'choices': [ { 'text': chunk['text'], -- cgit v1.2.3