From cbd7656bb4c9aebfe98c746111af52cf7192aa1b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 22:22:46 -0700 Subject: feat: :sparkles: testing in ci, final test of --- continuedev/src/continuedev/libs/llm/together.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'continuedev') diff --git a/continuedev/src/continuedev/libs/llm/together.py b/continuedev/src/continuedev/libs/llm/together.py index 1cc0a711..c3f171c9 100644 --- a/continuedev/src/continuedev/libs/llm/together.py +++ b/continuedev/src/continuedev/libs/llm/together.py @@ -49,6 +49,8 @@ class TogetherLLM(LLM): prompt += f": Hi!\n: {system_message}\n" for message in chat_messages: prompt += f'<{"human" if message["role"] == "user" else "bot"}>: {message["content"]}\n' + + prompt += ":" return prompt async def stream_complete(self, prompt, with_history: List[ChatMessage] = None, **kwargs) -> Generator[Union[Any, List, Dict], None, None]: @@ -113,6 +115,8 @@ class TogetherLLM(LLM): "Authorization": f"Bearer {self.api_key}" }) as resp: try: - return await resp.text() + text = await resp.text() + j = json.loads(text) + return j["output"]["choices"][0]["text"] except: raise Exception(await resp.text()) -- cgit v1.2.3-70-g09d2