Skip to content

Commit 7a6199e

Browse files
fix: update copilot.Blob to copilot.AttachmentTypeBlob and fix Python Optional codegen
- Update Go E2E test, README, and docs to use prefixed enum constant - Fix Python codegen modernizePython to handle deeply nested Optional types - Fix ruff formatting in e2e/test_multi_client.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 183abba commit 7a6199e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/features/image-input.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func main() {
315315
Prompt: "Describe what you see in this image",
316316
Attachments: []copilot.Attachment{
317317
{
318-
Type: copilot.Blob,
318+
Type: copilot.AttachmentTypeBlob,
319319
Data: &base64ImageData,
320320
MIMEType: &mimeType,
321321
DisplayName: &displayName,
@@ -333,7 +333,7 @@ session.Send(ctx, copilot.MessageOptions{
333333
Prompt: "Describe what you see in this image",
334334
Attachments: []copilot.Attachment{
335335
{
336-
Type: copilot.Blob,
336+
Type: copilot.AttachmentTypeBlob,
337337
Data: &base64ImageData, // base64-encoded string
338338
MIMEType: &mimeType,
339339
DisplayName: &displayName,

test/scenarios/prompts/attachments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Demonstrates sending **file attachments** alongside a prompt using the Copilot S
3939
|----------|------------------------|
4040
| TypeScript | `attachments: [{ type: "blob", data: base64Data, mimeType: "image/png" }]` |
4141
| Python | `"attachments": [{"type": "blob", "data": base64_data, "mimeType": "image/png"}]` |
42-
| Go | `Attachments: []copilot.Attachment{{Type: copilot.Blob, Data: &data, MIMEType: &mime}}` |
42+
| Go | `Attachments: []copilot.Attachment{{Type: copilot.AttachmentTypeBlob, Data: &data, MIMEType: &mime}}` |
4343

4444
## Sample Data
4545

0 commit comments

Comments
 (0)