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

Request: Be able to use OpenAI Assistant ID / Thread ID... #50

Open
Dan1jel opened this issue Nov 21, 2023 · 4 comments
Open

Request: Be able to use OpenAI Assistant ID / Thread ID... #50

Dan1jel opened this issue Nov 21, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@Dan1jel
Copy link

Dan1jel commented Nov 21, 2023

If possible, would be nice to use OpenAI with Assistant ID / Thread ID instad? if om not misstaken, this way it is possible to bypass 4k token limit? But also great to have access to the diffrent Assistant that one might build up. Math teacher, "Jarvis" etc etc.

@Dan1jel Dan1jel changed the title Request: Be able to use OpenAI Assistant / thread... Request: Be able to use OpenAI Assistant ID / Thread ID... Nov 21, 2023
@marcolardera marcolardera added the enhancement New feature or request label Nov 27, 2023
@marcolardera
Copy link
Owner

Hi @Dan1jel! Thank you, I'm looking into it

@moxious
Copy link
Contributor

moxious commented Nov 28, 2023

So I've done some coding with the assistant API -- I would suggest this would be a great thing to have in chatgtp-cli, but it might be too early.

Assitant API is still early beta, and they don't have a streaming option on the way back. You have to "fast poll" an endpoint to see when the job is done, which adds complexity & inefficiency to the code that would be needed. In any case, they're going to add streaming support soon.

Would totally support doing this though. Note that you can bypass the token limit by using different models, and so using assistants and bypassing the token limit are just different issues, you don't need one to do the other.

@Dan1jel
Copy link
Author

Dan1jel commented Nov 28, 2023

So I've done some coding with the assistant API -- I would suggest this would be a great thing to have in chatgtp-cli, but it might be too early.

Assitant API is still early beta, and they don't have a streaming option on the way back. You have to "fast poll" an endpoint to see when the job is done, which adds complexity & inefficiency to the code that would be needed. In any case, they're going to add streaming support soon.

Would totally support doing this though. Note that you can bypass the token limit by using different models, and so using assistants and bypassing the token limit are just different issues, you don't need one to do the other.

Aah I see, thanks for looking in too it :) my first idea was to, instead of a website that might reload and lose all history, a cli version would maybe have the history there, or be on going (in for example, a tmux window). But I understand, I just hope it will be possible in the near future :)

@moxious
Copy link
Contributor

moxious commented Nov 28, 2023

Via the OpenAI Assistants API and Threads (https://platform.openai.com/docs/assistants/how-it-works#:~:text=Assistants%20can%20access%20persistent%20Threads,it%20as%20your%20users%20reply.) -- they keep track of the threads. Probably wouldn't need to keep the threads locally, because they could be gotten by the API whenever you need them. The CLI would need to keep track of which thread you were on, and there'd probably have to be command line options for "make a new thread" vs. "pick up our chat as of the latest status on thread ID XYZ". A good default behavior would be to start a new thread every time the app runs

one slight concern for me though is that it's such an early beta, like I could probably build code to do this in an afternoon, but it would suck if it breaks in 3 weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants