Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions docs/features/image-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func main() {
session.Send(ctx, copilot.MessageOptions{
Prompt: "Describe what you see in this image",
Attachments: []copilot.Attachment{
&copilot.UserMessageAttachmentFile{
&copilot.AttachmentFile{
DisplayName: "screenshot.png",
Path: path,
},
Expand All @@ -146,7 +146,7 @@ path := "/absolute/path/to/screenshot.png"
session.Send(ctx, copilot.MessageOptions{
Prompt: "Describe what you see in this image",
Attachments: []copilot.Attachment{
&copilot.UserMessageAttachmentFile{
&copilot.AttachmentFile{
DisplayName: "screenshot.png",
Path: path,
},
Expand Down Expand Up @@ -179,9 +179,9 @@ public static class ImageInputExample
await session.SendAsync(new MessageOptions
{
Prompt = "Describe what you see in this image",
Attachments = new List<UserMessageAttachment>
Attachments = new List<Attachment>
{
new UserMessageAttachmentFile
new AttachmentFile
{
Path = "/absolute/path/to/screenshot.png",
DisplayName = "screenshot.png",
Expand All @@ -208,9 +208,9 @@ await using var session = await client.CreateSessionAsync(new SessionConfig
await session.SendAsync(new MessageOptions
{
Prompt = "Describe what you see in this image",
Attachments = new List<UserMessageAttachment>
Attachments = new List<Attachment>
{
new UserMessageAttachmentFile
new AttachmentFile
{
Path = "/absolute/path/to/screenshot.png",
DisplayName = "screenshot.png",
Expand Down Expand Up @@ -344,7 +344,7 @@ func main() {
session.Send(ctx, copilot.MessageOptions{
Prompt: "Describe what you see in this image",
Attachments: []copilot.Attachment{
&copilot.UserMessageAttachmentBlob{
&copilot.AttachmentBlob{
Data: base64ImageData,
MIMEType: mimeType,
DisplayName: &displayName,
Expand All @@ -361,7 +361,7 @@ displayName := "screenshot.png"
session.Send(ctx, copilot.MessageOptions{
Prompt: "Describe what you see in this image",
Attachments: []copilot.Attachment{
&copilot.UserMessageAttachmentBlob{
&copilot.AttachmentBlob{
Data: base64ImageData, // base64-encoded string
MIMEType: mimeType,
DisplayName: &displayName,
Expand Down Expand Up @@ -396,9 +396,9 @@ public static class BlobAttachmentExample
await session.SendAsync(new MessageOptions
{
Prompt = "Describe what you see in this image",
Attachments = new List<UserMessageAttachment>
Attachments = new List<Attachment>
{
new UserMessageAttachmentBlob
new AttachmentBlob
{
Data = base64ImageData,
MimeType = "image/png",
Expand All @@ -415,9 +415,9 @@ public static class BlobAttachmentExample
await session.SendAsync(new MessageOptions
{
Prompt = "Describe what you see in this image",
Attachments = new List<UserMessageAttachment>
Attachments = new List<Attachment>
{
new UserMessageAttachmentBlob
new AttachmentBlob
{
Data = base64ImageData,
MimeType = "image/png",
Expand Down
Loading
Loading