-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapter Implementation of MM inputs in OAI friendly format #1495
base: main
Are you sure you want to change the base?
Conversation
dspy/adapters/chat_adapter.py
Outdated
from typing import get_origin, get_args | ||
|
||
import PIL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to remove this import and fix the image detection/dspy.Image class
dspy/adapters/chat_adapter.py
Outdated
|
||
messages.append(format_turn(signature, inputs, role="user")) | ||
print(messages) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this print
@@ -42,6 +42,21 @@ def new_to_old_field(field): | |||
) | |||
|
|||
|
|||
class Image(str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this implementation a little better. AKA just be able to type check against it
Adds Image multimodal support.
You get prompts and outputs like the following:
Output