Class ChatRequestOptions.Builder
java.lang.Object
dev.langchain4j.model.chat.ChatRequestOptions.Builder
- Enclosing class:
ChatRequestOptions
- Since:
- 1.13.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddListenerAttribute(Object key, Object value) build()invocationId(UUID invocationId) Sets theInvocationContext.invocationId()of the AI Service invocation in which this call is made.listenerAttributes(Map<Object, Object> listenerAttributes)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
listenerAttributes
-
addListenerAttribute
-
invocationId
Sets theInvocationContext.invocationId()of the AI Service invocation in which this call is made.ChatModelListeners get it asinvocationId(). When it is not set, they get the id of the AI Service invocation that makes the call (the AI Service's own chat model calls, including those after tool executions, and the calls made by its tools, guardrails, retrieval, chat memory, ...), if any. Set it only when your code calls the model on another thread than the one of the invocation, where it is not passed on automatically.- Since:
- 1.24.0
-
build
-