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

Admin assistant updates #14

Merged
merged 6 commits into from
Dec 6, 2024
Merged

Admin assistant updates #14

merged 6 commits into from
Dec 6, 2024

Conversation

javo8a
Copy link
Contributor

@javo8a javo8a commented Dec 5, 2024

First implementation of new endpoints:
GET admin/assistant/{id}
GET admin/assistant/llm/{id}
GET admin/assistant/retrieverConnection/{id}

DELETE admin/assistant/{id}
DELETE admin/assistant/llm/{id}
DELETE admin/assistant/retrieverConnection/{id}

and POST now does Updates if "id" is provided in the request.

Added two classes:

  • ErrorMapper to handle exception to http error codes
  • MongoDbSetup for unique constraints on "name" fields for now. I just assume we don't want duplicate names on llm or retriever or assistants, right?

MISSING: MongoDB can be configured with object dependencies. I was reading about the setup but didn't make the changes. The current issue is that you can DELETE an Llm and the Assistant will just stay without the Llm which I believe is a bad state.

@javo8a javo8a requested a review from Jaland December 5, 2024 17:30
* @param event the startup event
*/
public void onStart(@Observes StartupEvent event) {
MongoDatabase database = mongoClient.getDatabase("composer");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add this to the liquibase instead of here just to make it consistent?
https://docs.liquibase.com/change-types/add-unique-constraint.html

@jland-redhat jland-redhat added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit b938aef Dec 6, 2024
4 checks passed
@jland-redhat jland-redhat deleted the admin-assistant-updates branch January 17, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants