Uses of Class
dev.langchain4j.model.decision.request.DecisionRequest
Packages that use DecisionRequest
Package
Description
Model mocks for tests: they need no network, answer the way a test tells them to, and record the requests they
receive.
-
Uses of DecisionRequest in dev.langchain4j.model.decision
Methods in dev.langchain4j.model.decision with parameters of type DecisionRequestModifier and TypeMethodDescriptiondefault DecisionResponseDecisionModel.decide(DecisionRequest request) Answers the questions of the given request.default CompletableFuture<DecisionResponse> DecisionModel.decideAsync(DecisionRequest request) Non-blocking counterpart ofDecisionModel.decide(DecisionRequest).DecisionModel.doDecide(DecisionRequest request) The provider hook behindDecisionModel.decide(DecisionRequest).default CompletableFuture<DecisionResponse> DecisionModel.doDecideAsync(DecisionRequest request) The provider hook behindDecisionModel.decideAsync(DecisionRequest). -
Uses of DecisionRequest in dev.langchain4j.model.decision.listener
Methods in dev.langchain4j.model.decision.listener that return DecisionRequestModifier and TypeMethodDescriptionDecisionModelErrorContext.decisionRequest()DecisionModelRequestContext.decisionRequest()DecisionModelResponseContext.decisionRequest()Methods in dev.langchain4j.model.decision.listener with parameters of type DecisionRequestModifier and TypeMethodDescriptionDecisionModelErrorContext.Builder.decisionRequest(DecisionRequest decisionRequest) Required:DecisionModelErrorContext.Builder.build()fails if it is not set.DecisionModelRequestContext.Builder.decisionRequest(DecisionRequest decisionRequest) Required:DecisionModelRequestContext.Builder.build()fails if it is not set.DecisionModelResponseContext.Builder.decisionRequest(DecisionRequest decisionRequest) Required:DecisionModelResponseContext.Builder.build()fails if it is not set.Constructors in dev.langchain4j.model.decision.listener with parameters of type DecisionRequestModifierConstructorDescriptionDecisionModelErrorContext(Throwable error, DecisionRequest decisionRequest, ModelProvider modelProvider, Map<Object, Object> attributes) Deprecated.DecisionModelRequestContext(DecisionRequest decisionRequest, ModelProvider modelProvider, Map<Object, Object> attributes) Deprecated.useDecisionModelRequestContext.builder()insteadDecisionModelResponseContext(DecisionResponse decisionResponse, DecisionRequest decisionRequest, ModelProvider modelProvider, Map<Object, Object> attributes) Deprecated.useDecisionModelResponseContext.builder()instead -
Uses of DecisionRequest in dev.langchain4j.model.decision.request
Methods in dev.langchain4j.model.decision.request that return DecisionRequest -
Uses of DecisionRequest in dev.langchain4j.model.google.genai
Methods in dev.langchain4j.model.google.genai with parameters of type DecisionRequestModifier and TypeMethodDescriptionGoogleGenAiDecisionModel.doDecide(DecisionRequest request) GoogleGenAiDecisionModel.doDecideAsync(DecisionRequest request) -
Uses of DecisionRequest in dev.langchain4j.model.googleai
Methods in dev.langchain4j.model.googleai with parameters of type DecisionRequestModifier and TypeMethodDescriptionGoogleAiGeminiDecisionModel.doDecide(DecisionRequest request) GoogleAiGeminiDecisionModel.doDecideAsync(DecisionRequest request) -
Uses of DecisionRequest in dev.langchain4j.model.ollama
Methods in dev.langchain4j.model.ollama with parameters of type DecisionRequestModifier and TypeMethodDescriptionOllamaDecisionModel.doDecide(DecisionRequest request) OllamaDecisionModel.doDecideAsync(DecisionRequest request) -
Uses of DecisionRequest in dev.langchain4j.model.openai
Methods in dev.langchain4j.model.openai with parameters of type DecisionRequestModifier and TypeMethodDescriptionOpenAiDecisionModel.doDecide(DecisionRequest request) OpenAiDecisionModel.doDecideAsync(DecisionRequest request) -
Uses of DecisionRequest in dev.langchain4j.model.openai.internal.decision
Methods in dev.langchain4j.model.openai.internal.decision with parameters of type DecisionRequestModifier and TypeMethodDescriptionstatic DecisionResponseDecisionMapper.toDecisionResponse(DecisionCreateResponse response, DecisionRequest request) static DecisionCreateRequestDecisionMapper.toOpenAiRequest(DecisionRequest request) -
Uses of DecisionRequest in dev.langchain4j.model.openaiofficial
Methods in dev.langchain4j.model.openaiofficial with parameters of type DecisionRequestModifier and TypeMethodDescriptionOpenAiOfficialDecisionModel.doDecide(DecisionRequest request) OpenAiOfficialDecisionModel.doDecideAsync(DecisionRequest request) -
Uses of DecisionRequest in dev.langchain4j.model.typesafe
Methods in dev.langchain4j.model.typesafe with parameters of type DecisionRequestModifier and TypeMethodDescriptionTypeSafeDecisionModel.doDecide(DecisionRequest request) TypeSafeDecisionModel.doDecideAsync(DecisionRequest request) -
Uses of DecisionRequest in dev.langchain4j.model.typesafe.internal
Methods in dev.langchain4j.model.typesafe.internal with parameters of type DecisionRequestModifier and TypeMethodDescriptionstatic DecisionResponseTypeSafeMapper.toDecisionResponse(TypeSafeResponse response, DecisionRequest request) static TypeSafeRequestTypeSafeMapper.toTypeSafeRequest(DecisionRequest request) -
Uses of DecisionRequest in dev.langchain4j.service.decision.internal
Methods in dev.langchain4j.service.decision.internal that return DecisionRequestModifier and TypeMethodDescriptionCreates the request for an invocation of this method with the given arguments.Methods in dev.langchain4j.service.decision.internal with parameters of type DecisionRequestModifier and TypeMethodDescriptionDecisionMethod.invokeWithResponse(DecisionServiceConfig config, DecisionRequest request) Invokes this method synchronously with the given request, typically created withDecisionMethod.toRequest(Object[]), and returns both its result and the response of the decision model, for frameworks that need the raw answers (for example their probabilities or the token usage) whatever the declared return type of the method. -
Uses of DecisionRequest in dev.langchain4j.test.mock
Methods in dev.langchain4j.test.mock that return DecisionRequestModifier and TypeMethodDescriptionMockDecisionModel.lastRequest()The last request received so far.MockDecisionModel.request()The only request received so far.Methods in dev.langchain4j.test.mock that return types with arguments of type DecisionRequestModifier and TypeMethodDescriptionMockDecisionModel.requests()A copy of the requests received so far, in the order they arrived.Methods in dev.langchain4j.test.mock with parameters of type DecisionRequestModifier and TypeMethodDescriptionMockDecisionModel.doDecide(DecisionRequest request) MockDecisionModel.doDecideAsync(DecisionRequest request) Answers likeMockDecisionModel.doDecide(DecisionRequest), with the next step of the script, and completes the future on another thread, where a step that computes its answers also computes them.Method parameters in dev.langchain4j.test.mock with type arguments of type DecisionRequestModifier and TypeMethodDescriptionstatic MockDecisionModelMockDecisionModel.thatAnswers(Function<? super DecisionRequest, ? extends Map<String, ? extends DecisionAnswer>> answers) A model that answers the first request with the answers computed from it, keyed by question name.MockDecisionModel.thenAnswers(Function<? super DecisionRequest, ? extends Map<String, ? extends DecisionAnswer>> answers) Adds a step: the next request is answered with the answers computed from it, keyed by question name. -
Uses of DecisionRequest in dev.langchain4j.test.service
Methods in dev.langchain4j.test.service that return DecisionRequestModifier and TypeMethodDescriptionDecisionModelCall.request()Returns the request sent to the decision model.
DecisionModelErrorContext.builder()instead