forked from MacPaw/OpenAI
-
Notifications
You must be signed in to change notification settings - Fork 16
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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTcyOTMsIm5iZiI6MTcyNTU5Njk5MywicGF0aCI6Ii8xMTU0NjQ3Ny8yODI2MjY5NjUtNGM4YTE2ZDYtMjA5NC00ZTUwLWI1ZDItNTNiYmQwMWRkZjNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDA0Mjk1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBiODdiNzk2ZWNkNTAyMjM5ODJlNjRiYTQzYWVmZDBlMmRiOTQwNmE3NjFmZDM2YWQ3NTEyMzQzM2IwODBlM2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.eGBgBP7koLyfSGm_WNlPQyDY6W4L0nuD83GpQP8liUI)
Chat with Assistant in thread
![chatThread](https://private-user-images.githubusercontent.com/11546477/282627003-8e2cb4b6-0bef-4259-9e08-de2913a00e71.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTcyOTMsIm5iZiI6MTcyNTU5Njk5MywicGF0aCI6Ii8xMTU0NjQ3Ny8yODI2MjcwMDMtOGUyY2I0YjYtMGJlZi00MjU5LTllMDgtZGUyOTEzYTAwZTcxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDA0Mjk1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYwYzUxMmZiOThjMTg1NDE4OWRhNGIyNDAzZjA4MjYyMGEyZDc3M2I4ODk0NDBkNjIyODdhNDBiNTFhMDk1NzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.W0SmWVXge30LAEUGPho_YmMzx2BP1rtrcR3iQlOKnro)
List assistants
![listAssistants](https://private-user-images.githubusercontent.com/11546477/282627045-e2cd2938-6af8-45c5-9e93-1603061fedc4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTcyOTMsIm5iZiI6MTcyNTU5Njk5MywicGF0aCI6Ii8xMTU0NjQ3Ny8yODI2MjcwNDUtZTJjZDI5MzgtNmFmOC00NWM1LTllOTMtMTYwMzA2MWZlZGM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDA0Mjk1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUxOWJmYzJmNzRmMWM0NTNmNDU2ZDYwMWU1MWVkN2I1ZjM2MWMwYjcyMDJiNjUxN2FkMDgzMzVkOGIwODEwMWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.6iss_1I7b8ZWBNafhH4HTbPYUzKTq3uSJ4hp77tD8_0)
Describe the solution you'd like
Support for Assistants, Threads, Runs, Run Retrieval, Fetching messages from threads, and uploading files to OpenAI API.