You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I´m trying the example described here and warnings of "Invalid type" are appearing constantly on the terminal.
Code to reproduce the error
from smolagents import (
CodeAgent,
ToolCallingAgent,
ManagedAgent,
DuckDuckGoSearchTool,
VisitWebpageTool,
OpenAIServerModel,
)
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor
endpoint = "http://localhost:6006/v1/traces"
trace_provider = TracerProvider()
trace_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint)))
SmolagentsInstrumentor().instrument(tracer_provider=trace_provider)
model = OpenAIServerModel(
model_id="meta-llama/Llama-3.3-70B-Instruct",
api_key="-",
api_base="http://localhost:10000/v1",
)
agent = ToolCallingAgent(
tools=[DuckDuckGoSearchTool(), VisitWebpageTool()],
model=model,
)
managed_agent = ManagedAgent(
agent=agent,
name="managed_agent",
description="This is an agent that can do web search.",
)
manager_agent = CodeAgent(
tools=[],
model=model,
managed_agents=[managed_agent],
)
manager_agent.run(
"If the US keeps its 2024 growth rate, how many years will it take for the GDP to double?"
)
Error logs (if any)
━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━
Invalid type dict in attribute 'llm.input_messages.0.message.content' value sequence.
Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or None
Invalid type dict in attribute 'llm.input_messages.1.message.content' value sequence.
Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or None
Invalid type dict in attribute 'llm.input_messages.2.message.content' value sequence.
Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or None
Expected behavior
No warnings or errors
Packages version:
smolagents 1.7.0
Additional context
No additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
I´m trying the example described here and warnings of "Invalid type" are appearing constantly on the terminal.
Code to reproduce the error
Error logs (if any)
Expected behavior
No warnings or errors
Packages version:
smolagents 1.7.0
Additional context
No additional context
The text was updated successfully, but these errors were encountered: