LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Browser
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
  • Tools
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Decisions
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Compat
  • Event
  • Llms
  • Openai Completions Stream
  • Profile
  • Stream
  • Structured Output
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Testing
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Gateway
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Standard Schema
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Uuid
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

Chat LangChain

What can I help with?

Enter to sendĀ·Shift+Enter new line

Menu

LangChain
BrowserUniversalHubNodeLoadSerializableEncoder BackedFile SystemIn MemoryTools
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextDecisionsBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsCompatEventLlmsOpenai Completions StreamProfileStreamStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryTestingToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingGatewayHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesUuidVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/coredecisionsClassifierResponse
Interfaceā—Since v1.4

ClassifierResponse

Typed answers and metadata returned from one classification request.

Read every answer from answers, or use nouls, choices, scores, and boxes for views filtered by answer type. Each map preserves the question IDs supplied in ClassifierRequest.questions. The views are non-enumerable so they are not duplicated into traces or JSON.stringify output.

Q is the questions map that was asked. When it is known, answers and views are typed per question ID, and a Choice answer's choice is one of its labels.

Copy
interface ClassifierResponse

Properties

property
answers: Answers<Q>

All answers keyed by their original question IDs.

property
boxes: AnswersOfType<Q, "box">

Localization answers keyed by their original question IDs.

property
choices: AnswersOfType<Q, "choice">

Categorical answers keyed by their original question IDs.

property
model: string

Model that answered the request.

property
nouls: AnswersOfType<Q, "noul">

Binary answers keyed by their original question IDs.

property
requestId: string

Provider request ID, useful when diagnosing a request with provider support.

property
scores: AnswersOfType<Q, "score">

Ordinal answers keyed by their original question IDs.

property
usage_metadata: UsageMetadata

Token usage reported for the request, if any. A missing count is treated as 0, and total_tokens defaults to their sum.

View source on GitHub