fix renaming user messages to assistant

This commit is contained in:
Nate Sesti 2023-07-07 14:36:14 -07:00
parent 640f267e5e
commit f9a06f3eed
2 changed files with 3 additions and 2 deletions

View file

@ -38,7 +38,8 @@ class ChatMessage(ContinueBaseModel):
del d[key]
if not with_functions:
d["role"] = "assistant"
if d["role"] == "function":
d["role"] = "assistant"
if "name" in d:
del d["name"]
if "function_call" in d:

View file

@ -27,7 +27,7 @@ class SimpleChatStep(Step):
async def run(self, sdk: ContinueSDK):
completion = ""
messages = self.messages or await sdk.get_chat_context()
async for chunk in sdk.models.gpt4.stream_chat(messages):
async for chunk in sdk.models.gpt4.stream_chat(messages, temperature=0.5):
if sdk.current_step_was_deleted():
return