Skip to content

Commit

Permalink
Hopefully fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aymeric-roucher committed Nov 11, 2024
1 parent d46bba3 commit 05996e4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/transformers/agents/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ def pull_message(step_log: dict, test_mode: bool = True):
if test_mode:

class ChatMessage:
role: str
content: dict
def __init__(self, role, content, metadata=None):
self.role = role
self.content = content
self.metadata = metadata
else:
raise ImportError("Gradio should be installed in order to launch a gradio demo.")

Expand Down Expand Up @@ -61,8 +63,10 @@ def stream_to_gradio(agent: ReactAgent, task: str, test_mode: bool = False, **kw
if test_mode:

class ChatMessage:
role: str
content: dict
def __init__(self, role, content, metadata=None):
self.role = role
self.content = content
self.metadata = metadata
else:
raise ImportError("Gradio should be installed in order to launch a gradio demo.")

Expand Down

0 comments on commit 05996e4

Please sign in to comment.