forked from MacPaw/OpenAI
-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: Assistants API #1
Open
cdillard
wants to merge
11
commits into
main
Choose a base branch
from
feat/assistants-openai-api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 tasks
Hello Regards |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Yeah, I'd like to be able to support the assistant features like threads, runs, and files with assistants API.
I have a PR to start to explore the possibilities here.
Six new API endpoints are exposed in the APIPath to support the assistants API.
The
OpenAIProtocol
is modified as follows: addedAssistants:
Tools can be passed to assistant creation.
Threads/Runs
Files
Example App:
A new demonstration of the assistants API and its requirements of the polling has been added to the Demo app.
Now you can create a new assistant on the Chats tab by selecting "+" -> New Assistant -> Fill in details -> OK.
This should result in a "New Assistant" row being added to the chats, you can chat with your newly created assistant in this conversation.
You can now list your OpenAI API Assistants on the "Assistants" tab. Select "+" -> Get Assistants to load the assistants list.
Create Assistant
![createAssistant](https://private-user-images.githubusercontent.com/11546477/282626965-4c8a16d6-2094-4e50-b5d2-53bbd01ddf3f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjA0NzYsIm5iZiI6MTczOTUyMDE3NiwicGF0aCI6Ii8xMTU0NjQ3Ny8yODI2MjY5NjUtNGM4YTE2ZDYtMjA5NC00ZTUwLWI1ZDItNTNiYmQwMWRkZjNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA4MDI1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI0ZTAyMDNmNTJlYmI2MWY3MjA5ODBiYjllNmQ5NDZhOGQ5NGUwZmU4ZGJiODAyMGRiMzU2MGZkOGY0MTY2MzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EYrgUgILfCmSfptNWqm7Nuqbq2hm23345Nw1gxr_aLw)
Chat with Assistant in thread
![chatThread](https://private-user-images.githubusercontent.com/11546477/282627003-8e2cb4b6-0bef-4259-9e08-de2913a00e71.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjA0NzYsIm5iZiI6MTczOTUyMDE3NiwicGF0aCI6Ii8xMTU0NjQ3Ny8yODI2MjcwMDMtOGUyY2I0YjYtMGJlZi00MjU5LTllMDgtZGUyOTEzYTAwZTcxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA4MDI1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThjMmZkODgyYTgyYjQzMjdmZjlmYzYxYTk1OWY3ODc5MjgyOWJiYTZhOGE4MDM3ZDhkNzcxMDQwN2JmZTBmNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.g8Qw0kYeX_njfjTAUhqin0ZFKdYJBIjz2XJemT7g7XU)
List assistants
![listAssistants](https://private-user-images.githubusercontent.com/11546477/282627045-e2cd2938-6af8-45c5-9e93-1603061fedc4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjA0NzYsIm5iZiI6MTczOTUyMDE3NiwicGF0aCI6Ii8xMTU0NjQ3Ny8yODI2MjcwNDUtZTJjZDI5MzgtNmFmOC00NWM1LTllOTMtMTYwMzA2MWZlZGM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA4MDI1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY5NDhlYTg5YjNkNjllOTBmYTlkNmQ5N2YyNDllNjMxNGQ2ZDEwM2FjMjgyN2JjYmFlNTkyNjUwZmRiZDQ5OGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wQ7cxAVv5TOgHE2FDYFz8zEYv1EbUs0LCtPCY5x7fuA)
Describe the solution you'd like
Support for Assistants, Threads, Runs, Run Retrieval, Fetching messages from threads, and uploading files to OpenAI API.