Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Support Assistants #395

Merged
merged 12 commits into from
Nov 12, 2023
Merged

Conversation

remyohajinwa
Copy link
Contributor

@remyohajinwa remyohajinwa commented Nov 11, 2023

Provides Support for #390

@TheoKanning TheoKanning merged commit fb62307 into TheoKanning:main Nov 12, 2023
2 checks passed
@TheoKanning
Copy link
Owner

Thanks for adding this!

@vacuityv
Copy link
Contributor

@remyohajinwa @TheoKanning The tool object used to create "Assistants" need to be fixed. There is only one param "type" in this code. But when the tool type is "function" it need another param to defined the function. You can see the official api here: https://platform.openai.com/docs/api-reference/assistants/createAssistant
Maybe you guys can fix this.

@vacuityv
Copy link
Contributor

also I can fix it too

@vacuityv
Copy link
Contributor

image

this need to be fixed too

@remyohajinwa
Copy link
Contributor Author

HI @vacuityv for the Tools....it's an Enum of Function, code_interepreter and retriever. you can check the class AssistantToolsEnum

@remyohajinwa
Copy link
Contributor Author

@vacuityv taking a look at the second issue

@vacuityv
Copy link
Contributor

@remyohajinwa I know you defined the tool with an Enum of Function. I meant that when the type is function I need some param to pass the function.

@remyohajinwa
Copy link
Contributor Author

Oh I see what you mean @vacuityv. Thank you for spotting this. will jump on it ASAP. but if you have a PR already. that would be nice

@remyohajinwa
Copy link
Contributor Author

@vacuityv for AssistantRequest. I think it was a mistake with the naming convention. Taking a look. Will fix this.

AssistantBase build = AssistantRequest.builder() .model(TikTokensUtil.ModelEnum.GPT_4_1106_preview.getName()) .name(MATH_TUTOR) .instructions(ASSISTANT_INSTRUCTION) .tools(Collections.singletonList(new Tool(AssistantToolsEnum.CODE_INTERPRETER))) .build();

@vacuityv
Copy link
Contributor

vacuityv commented Nov 13, 2023 via email

@vacuityv
Copy link
Contributor

vacuityv commented Nov 13, 2023 via email

@remyohajinwa
Copy link
Contributor Author

Taking a look

@vacuityv
Copy link
Contributor

How can I use the assistant ? Where are the thread and run part ? How can I use the assistant? @remyohajinwa

@remyohajinwa
Copy link
Contributor Author

remyohajinwa commented Nov 13, 2023

@vacuityv the Assistants is meant to work with Thread and Run. However the issue I worked on was to provide support for Assistant. It was expected that someone else would take up Thread or Run. An issue has to be created though. I think someone else is working on it

@vacuityv
Copy link
Contributor

@remyohajinwa I don't think this should be merged since it's just part of the feature. You guys should finish together and request together. It's real confused.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants