fix parroting bug
This commit is contained in:
parent
e9d090f2b2
commit
ee37fd0c55
2 changed files with 3 additions and 8 deletions
|
|
@ -30,15 +30,8 @@ class SimpleChatStep(Step):
|
|||
self.description = ""
|
||||
await sdk.update_ui()
|
||||
|
||||
messages = await sdk.get_chat_context()
|
||||
messages.append(ChatMessage(
|
||||
role="user",
|
||||
content=self.user_input,
|
||||
summary=self.user_input
|
||||
))
|
||||
|
||||
completion = ""
|
||||
async for chunk in sdk.models.gpt4.stream_chat(messages):
|
||||
async for chunk in sdk.models.gpt4.stream_chat(await sdk.get_chat_context()):
|
||||
if sdk.current_step_was_deleted():
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -71,9 +71,11 @@ const MainTextInput = styled.textarea`
|
|||
background-color: ${secondaryDark};
|
||||
color: white;
|
||||
z-index: 1;
|
||||
border: 1px solid transparent;
|
||||
|
||||
&:focus {
|
||||
outline: 1px solid ${lightGray};
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue