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

Make it possible to use a CustomMessage with Ollama #1248

Open
fjuma opened this issue Jan 27, 2025 · 4 comments · May be fixed by #1255
Open

Make it possible to use a CustomMessage with Ollama #1248

fjuma opened this issue Jan 27, 2025 · 4 comments · May be fixed by #1255

Comments

@fjuma
Copy link
Contributor

fjuma commented Jan 27, 2025

Once langchain4j/langchain4j#2399 is included in the next LangChain4j release, we can update the Ollama MessageMapper to make it possible to make use of a dev.langchain4j.data.message.CustomMessage.

CustomMessages can be useful for some models like Granite Guardian that make use of non-standard messages with a "context" role to assess the retrieved context used for Retrieval-Augmented Generation (RAG).

@fjuma
Copy link
Contributor Author

fjuma commented Jan 27, 2025

I can submit a PR for this.

@geoand Just wanted to check with you first. For something like this that depends on a change that will be included in the next LangChain4j release, is it ok to submit a draft pull request against Quarkus LangChain4j now or is it better to wait for the change to become available in a LangChain4j release first and then submit the PR against Quarkus LangChain4j after that?

@geoand
Copy link
Collaborator

geoand commented Jan 27, 2025

I would just go ahead and do whatever unblocks you quickest.
We can figure out converging later

@fjuma
Copy link
Contributor Author

fjuma commented Jan 27, 2025

Sounds good, thanks for the quick response! I'll likely submit a draft PR for this.

@geoand
Copy link
Collaborator

geoand commented Jan 28, 2025

👌

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 a pull request may close this issue.

2 participants