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
A seemingly valid PDL program produces
notools.pdl:2 - Error during 'ollama/granite-code:8b' model call: TypeError("Invalid message type: <class 'str'>. Expected dict or Pydantic model.")
If run with Open Telemetry support, produces the above, plus opentelemetry.py:651 - OpenTelemetry logging error in set_attributes 'str' object has no attribute 'get', plus a backtrace.
To Reproduce
Use pdl notools.pdl with the program
text:
- model: ollama/granite-code:8b
input:
array:
- role: user
content: What's the current weather in New York?
- role: assistant
# If I don't define this, I get "Invalid message type: <class 'str'>. Expected dict or Pydantic model."
# content: ""
Expected behavior
An LLM response regarding weather
Desktop (please complete the following information):
Additional context
Uncommenting the content line in the example fixes the problem, yielding an expected hallucination:
assistant: The current weather in New York is sunny with a high of 72 degrees. The air pressure is 1023 mb, and the wind speed is 6 mph from the southwest. There is a 25% chance of rain.
The text was updated successfully, but these errors were encountered:
@esnible Thanks for reporting, but without the content field the message is ill-formed. That error message comes from ollama, not PDL (there should be an error).
I am using the PDL Schemas in VSCode, but no error is displayed, which caused me to think the program was valid.
I am not suggesting my PDL progam is correct. I am suggesting that the error, "Expected dict or Pydantic model" is difficult to understand. I am left confused about which PDL entity should be changed from string to dict or Pydantic model.
I don't know if it makes a difference, but I stumbled across this looking at https://www.ibm.com/granite/docs/models/granite/#granite-3.1-highlights . It showed a prompt that seemed to end with empty assistant response. I have another variant PDL program that lists tools, and I was using it to test how Granite produces tool calling.
Describe the bug
A seemingly valid PDL program produces
If run with Open Telemetry support, produces the above, plus
opentelemetry.py:651 - OpenTelemetry logging error in set_attributes 'str' object has no attribute 'get'
, plus a backtrace.To Reproduce
Use
pdl notools.pdl
with the programExpected behavior
An LLM response regarding weather
Desktop (please complete the following information):
Additional context
Uncommenting the
content
line in the example fixes the problem, yielding an expected hallucination:The text was updated successfully, but these errors were encountered: