Skip to content

Commit

Permalink
add minor fixes (#4102)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwzeng1 authored Jun 23, 2024
1 parent cca075f commit d477669
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sweep_chat/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,10 @@ const UserMessageDisplay = ({
e.preventDefault()
}}
variant="default"
className="ml-2 bg-slate-600 text-white hover:bg-slate-700"
className="ml-2 bg-blue-900 text-white hover:bg-blue-800"
>
Send
<FaPaperPlane />
&nbsp;&nbsp;Send
</Button>
</>
)}
Expand Down
5 changes: 5 additions & 0 deletions sweepai/core/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def to_openai(self) -> str:
obj["name"] = self.name
return obj

def __repr__(self):
# take the first 100 and last 100 characters of the message if it's too long
truncated_message_content = self.content[:100] + "..." + self.content[-100:] if len(self.content) > 200 else self.content
return f"\nSTART OF MESSAGE\n\n{truncated_message_content}\n\nROLE: {self.role} FUNCTION_CALL: {self.function_call} NAME: {self.name} ANNOTATIONS: {self.annotations if self.annotations else ''} KEY: {self.key}\n\nEND OF MESSAGE\n\n"


class Function(BaseModel):
class Parameters(BaseModel):
Expand Down

0 comments on commit d477669

Please sign in to comment.