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

Code interpreter sample #31876

Open
wants to merge 3 commits into
base: feature/azure-ai-sdk
Choose a base branch
from

Conversation

ZachhK
Copy link
Member

@ZachhK ZachhK commented Nov 21, 2024

No description provided.

@ZachhK ZachhK marked this pull request as ready for review November 21, 2024 19:54
@ZachhK ZachhK requested review from xirzec and a team as code owners November 21, 2024 19:54
m.content.forEach(async (content: MessageContentOutput) => {
if (isOutputOfType<MessageImageFileContentOutput>(content, "image_file")) {
const imageContent = content as MessageImageFileContentOutput;
const file = await client.agents.uploadFile(fs.createReadStream(imageContent.image_file.file_id), "assistants", "uploaded-image-file");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curios why is it needed to update file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ganeshyb I was trying to pull directly from the message with the image file to save it but the loop was unnecessary, I removed it. Right now the file is saved but it is empty. I believe for the file content to be added I need to use the getFileContent method but there is still an issue with the stream, do you know of a fix?

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

Successfully merging this pull request may close these issues.

2 participants