Skip to content
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

Add type to content #18

Closed
Codelisk opened this issue May 10, 2024 · 2 comments
Closed

Add type to content #18

Codelisk opened this issue May 10, 2024 · 2 comments

Comments

@Codelisk
Copy link
Contributor

https://platform.openai.com/docs/assistants/how-it-works/managing-threads-and-messages

file = client.files.create(
  file=open("myimage.png", "rb"),
  purpose="vision"
)
thread = client.beta.threads.create(
  messages=[
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What is the difference between these images?"
        },
        {
          "type": "image_url",
          "image_url": {"url": "https://example.com/image.png"}
        },
        {
          "type": "image_file",
          "image_file": ("file_id": file.id)
        },
      ],
    }
  ]
)

I would to use the image_url type for assistant messages, however in the Message.cs i only see content as string. Is that possible to change?

@JZO001
Copy link
Owner

JZO001 commented May 12, 2024

Hello,
The feature added in v1.4.6, please have a look at it.

@Codelisk
Copy link
Contributor Author

That was quick thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants