langchain4j / langchain4j

Java version of LangChain
https://docs.langchain4j.dev
Apache License 2.0
4.56k stars 897 forks source link

[FEATURE] finishReason in Result #1341

Closed fb33 closed 3 months ago

fb33 commented 3 months ago

Hi,

I use Result class as a the return type of my method from my AI service, so I can have the content from the AI response and also the sources retrieved from the Rag. But if there is a problem with LLM request, I have no access to the cause.

What about having the finishReason of the ai response in the Result class ?

I'll quickly create a PR for that.

Thanks

langchain4j commented 3 months ago

Implemented in https://github.com/langchain4j/langchain4j/pull/1342