azure-samples / azureai-samples Goto Github PK
View Code? Open in Web Editor NEWOfficial community-driven Azure AI Examples
License: MIT License
Official community-driven Azure AI Examples
License: MIT License
Linux
Python: 3.11.7
Links should go to each of the 4 sample assistants mentioned
File not found for each
β¬οΈ markdown and relative link issue - should repo in any envio. inc. just browsing readme in github.com
There are some examples in the /notebooks folder but they're named differently to the ones in the README. It's not clear which is which, or if these are the same samples referred to in the README
π Thank you for providing these samples and READMEs - this is an exciting new feature and this is a great way to get hands-on. keen to test!π
Windows
1
ModuleNotFoundError: No module named 'openai.types.beta.threads.message_content_image_file'
1
1
No response
Windows
python version: 3.10
openai package version: 1.36.0
I tried to import the requirement libraries
from openai import AzureOpenAI
from openai.types.beta.threads.message_content_image_file import MessageContentImageFile
from openai.types.beta.threads.message_content_text import MessageContentText
from openai.types.beta.threads.messages import MessageFile
from PIL import Image
No error while excuting
No module found
I try to downgrade the openai
library version to 1.11.0, it works, but plz fix it in requirement.txt
Windows
Python Version: 3.12
I am following the notebook sample verbatim found HERE. It does not work.
The cell where you prep the assistand with the file_ids throws:
BadRequestError: Error code: 400 - {'error': {'message': 'Files [assistant-abc123] are invalid', 'type': 'invalid_request', 'param': None, 'code': None}}
Just try to run the sample.
It should be able to answer the questions using process_message
Fails to create the assistant using the file_ids
No response
Windows
Sample Assistants - Jupyter notebooks that are listed on the Assistants API-in-a-Box readme file are not available ( the links are broken)
Topic Description
Assistant-01: Foundational Concepts Showcases the foundational concepts of Assistants such as Threads, Messages, Runs, Tools, and lifecycle management.
Assistant-02: Helper The aihelper.py file serves as a helper library that extracts repetitive code, such as handling lifetime events. It keeps track of instantiated Assistants, Files, and Threads, and can dispose of them when they are no longer needed. aihelper.py also provides a delegate interface to pass Assistant functions. While it is not mandatory to use aihelper.py in your code, this Assistant and the others depend on it.
Assistant-03: Financial Summary Assistant Using Function calling, this Assistant can summarize a financial news article, extract the ticker symbols from the article, and provide a summary of the article and the latest (simulated) stock prices.
Assistant-04: Portpolio Reporting Assistant Using Assistant tools Code Interpreter and Function calling, this bot can get a CSV portfolio file, calculate the latest portfolio value based on the latest stock prices, point out the best and the worst investment, and email a report to a client.
Prerequisites
go to the Assistants API-in-a-Box readme page
the sample notebooks should be there by clicking on the links
the links mentioned above are not avaiable.
No response
Windows
Operating System
Windows
Version Information
Python Version: 3.12.2
I am following the notebook sample verbatim found HERE. It does not work.
The cell where you prep the assistand with the file_ids throws:
NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
Just try to run the sample.
It should be able to answer the questions using process_message
Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
No response
Windows
I ran the code assistant-math_tutor at codespaces. I got the error that ModuleNotFoundError: No module named 'openai.types.beta.threads.message_content_image_file'
Python Version: 3.10
from openai.types.beta.threads.message_content_image_file import MessageContentImageFile
from openai.types.beta.threads.message_content_text import MessageContentText
no error
can not load the
from openai.types.beta.threads.message_content_image_file import MessageContentImageFile
from openai.types.beta.threads.message_content_text import MessageContentText
No response
Windows
While running the sample https://github.com/Azure-Samples/azureai-samples/blob/main/scenarios/GPT-4V/video/video_chatcompletions_example_restapi.ipynb with own video throws an error:
{"choices":[{"messages":[{"delta":{"role":"tool", "content": "{"ErrorMessage":The 'video' enhancement requires a data source of type 'AzureComputerVisionVideoIndex'.,"ErrorCode": 400}"}}]}]}
This is how my payload looks:
payload = {
"model": "gpt-4-vision-preview",
"enhancements": {
"video": {
"enabled": True
}
},
"dataSources": [
{
"type": "AzureComputerVisionVideoIndex",
"parameters": {
"computerVisionBaseUrl": f"{vision_api.get('endpoint')}computervision",
"computerVisionApiKey": vision_api.get("key"),
"indexName": video_index.get("video_index_name"),
"videoUrls": [video_index.get("video_SAS_url")],
},
}
],
"messages": messages,
"max_tokens": 800,
"stream": True
}
Few changes were made to the api_url from this documentation https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/gpt-with-vision?tabs=rest%2Csystem-assigned%2Cresource
Run the above sample with a new video
suppose to get output like this:
{
"id": "chatcmpl-8V4J2cFo7TWO7rIfs47XuDzTKvbct",
"object": "chat.completion",
"created": 1702415412,
"model": "gpt-4",
"choices":
[
{
"finish_reason":"stop",
"index": 0,
"message":
{
"role": "assistant",
"content": "The advertisement video opens with a blurred background that suggests a serene and aesthetically pleasing environment, possibly a workspace with a nature view. As the video progresses, a series of frames showcase a digital interface with search bars and prompts like "Inspire new ideas," "Research a topic," and "Organize my plans," suggesting features of a software or application designed to assist with productivity and creativity.\n\nThe color palette is soft and varied, featuring pastel blues, pinks, and purples, creating a calm and inviting atmosphere. The backgrounds of some frames are adorned with abstract, organically shaped elements and animations, adding to the sense of innovation and modernity.\n\nMidway through the video, the focus shifts to what appears to be a browser or software interface with the phrase "Screens simulated, subject to change; feature availability and timing may vary," indicating the product is in development and that the visuals are illustrative of its capabilities.\n\nThe use of text prompts continues with "Help me relax," followed by a demonstration of a 'dark mode' feature, providing a glimpse into the software's versatility and user-friendly design.\n\nThe video concludes by revealing the product name, "Copilot," and positioning it as "Your everyday AI companion," implying the use of artificial intelligence to enhance daily tasks. The final frames feature the Microsoft logo, associating the product with the well-known technology company.\n\nIn summary, the advertisement video is for a Microsoft product named "Copilot," which seems to be an AI-powered software tool aimed at improving productivity, creativity, and organization for its users. The video conveys a message of innovation, ease, and support in daily digital interactions through a visually appealing and calming presentation."
}
}
],
"usage":
{
"prompt_tokens": 2068,
"completion_tokens": 341,
"total_tokens": 2409
}
}
Gets back this
{"choices":[{"messages":[{"delta":{"role":"tool", "content": "{"ErrorMessage":The 'video' enhancement requires a data source of type 'AzureComputerVisionVideoIndex'.,"ErrorCode": 400}"}}]}]}
No response
In order to protect and secure Microsoft, private
or internal
repositories in GitHub for Open Source which are not related to open source projects or require collaboration with 3rd parties (customer, partners, etc.) must be migrated to GitHub inside Microsoft a.k.a GitHub Enterprise Cloud with Enterprise Managed User (GHEC EMU).
βοΈ Please RSVP to opt-in or opt-out of the migration to GitHub inside Microsoft.
βOnly users with admin
permission in the repository are allowed to respond. Failure to provide a response will result to your repository getting automatically archived.π
Reply with a comment on this issue containing one of the following optin
or optout
command options below.
β Opt-in to migrate
@gimsvc optin --date <target_migration_date in mm-dd-yyyy format>
Example:
@gimsvc optin --date 03-15-2023
OR
β Opt-out of migration
@gimsvc optout --reason <staging|collaboration|delete|other>
Example:
@gimsvc optout --reason staging
Options:
staging
: This repository will ship as Open Source or gopublic
collaboration
: Used for external or 3rd party collaboration with customers, partners, suppliers, etc.delete
: This repository will be deleted because it is no longer needed.other
: Other reasons not specified
Windows
Broken Link for Sample code for multi-modality in azure ai studio page
Go to a sample Jupyter notebook GPT-4V.ipynb
The Notebook is not present or the Link is not correctly mapped to the actual sample code
Not sure if this needs to be added as a new issue.
Please close this issue if it is not relevant
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.