fix renaming user messages to assistant
This commit is contained in:
parent
640f267e5e
commit
f9a06f3eed
2 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue