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

Adding disabled implementation of all model interfaces #549

Merged
merged 3 commits into from Feb 8, 2024

Conversation

edeandrea
Copy link
Contributor

@edeandrea edeandrea commented Jan 25, 2024

Adding a default set of model implementations that essentially "disable" the model. All the operations throw a ModelDisabledException.

These can be used in tests as well as by other frameworks/libraries which extend Langchain4J where maybe users want to "not" make live calls when deploying into a certain environment for whatever reason.

For example, I plan to take this in the quarkus-langchain4j extension and based on user runtime configuration apply these models rather than other custom ones that Quarkus uses.

@langchain4j
Copy link
Owner

Hi @edeandrea thanks a lot for your contribution! I will check this next week after the release.

@edeandrea
Copy link
Contributor Author

Once this is merged & released then quarkiverse/quarkus-langchain4j#130 will consume it.

@edeandrea
Copy link
Contributor Author

Hello. Just wanted to give a gentle ping on this to see about getting it merged.

Copy link
Owner

@langchain4j langchain4j left a comment

Choose a reason for hiding this comment

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

@edeandrea thanks!

@langchain4j langchain4j merged commit a4b44fb into langchain4j:main Feb 8, 2024
6 checks passed
@edeandrea edeandrea deleted the disabled-models branch February 8, 2024 12:12
@edeandrea
Copy link
Contributor Author

Thank you!

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.

None yet

2 participants