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

Support a Spring AI based chatbot in Petclinic #1656

Closed
wants to merge 8 commits into from

Conversation

odedia
Copy link

@odedia odedia commented Sep 11, 2024

This pull request adds a new Chatbot in Spring Petclinic.
It can be used used to ask the clinic questions about owners and vets.
Some of the questions you may ask:

  1. Please list the owners that come to the clinic.
  2. How many vets are there?
  3. Is there an owner named Betty?
  4. Which owners have dogs?
  5. Add a dog for Betty. Its name is Moopsie.

And many more.

The implementation is under the spring profile openai, which is the only supported LLM at the moment (either azure-openai or regular openai). In the default profile, the chatbot returns "chat is unavailable".
See guide in main readme.md on how to use.

@dsyer
Copy link
Member

dsyer commented Sep 11, 2024

This looks like really good work and sticks well (but maybe not quite well enough) to the constraints we impose on this project. The main constraint it violates is "no new features", so I'm not sure we want to merge really, but it's good to see how to do it. There's always the possibility of creating a new project in https://github.com/spring-petclinic.

I'm quite pleased that the Javascript is nearly free of dependencies, but it would be better to use webjars (same as all the others). The CSS changes probably need to go in petclinic.scss (there's a reason that petclinic.css is ignored by git). You would also need to remove the kubernetes/tanzu specific configuration files, if you feel like pushing it along a bit further.

@odedia
Copy link
Author

odedia commented Sep 11, 2024

Perhaps it makes more sense to include this in a separate branch and not the main branch?
I’ll address the SCSS issue remove the Tanzu specific code.

@dsyer
Copy link
Member

dsyer commented Sep 11, 2024

A separate branch might be good. It would be unlikely to get any maintenance, but it's probably a good way to evolve the feature (which feels like it might need to mature a bit - e.g. making something that works without any additional configuration maybe, or without a subscription at least).

@dsyer
Copy link
Member

dsyer commented Sep 11, 2024

I created a new branch spring-ai. Please submit more PRs against that (e.g. some documentation about how to set up the credentials, maybe a chat session example).

@dsyer dsyer closed this Sep 11, 2024
@odedia
Copy link
Author

odedia commented Sep 11, 2024

Thanks, will do. I added documentation in the main readme.md but it can always be improved.

@dsyer
Copy link
Member

dsyer commented Sep 11, 2024

Nice! I missed that somehow.

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