View Source LangChain.Tools.DeepResearch.ResearchStatus (LangChain v0.4.0)

Represents the status of a Deep Research request.

This schema captures the current state of a research request, including progress information and any errors that may have occurred.

Summary

Functions

Creates a changeset for research status.

Checks if the research is complete (either successfully or with failure).

Checks if the research failed.

Creates a ResearchStatus from an OpenAI API response.

Gets a human-readable description of the current status.

Checks if the research completed successfully.

Types

@type t() :: %LangChain.Tools.DeepResearch.ResearchStatus{
  created_at: integer() | nil,
  error_code: String.t() | nil,
  error_message: String.t() | nil,
  id: String.t(),
  progress_info: map() | nil,
  status: String.t()
}

Functions

Link to this function

changeset(status \\ %__MODULE__{}, attrs)

View Source
@spec changeset(t(), map()) :: Ecto.Changeset.t()

Creates a changeset for research status.

@spec complete?(t()) :: boolean()

Checks if the research is complete (either successfully or with failure).

@spec failed?(t()) :: boolean()

Checks if the research failed.

Link to this function

from_api_response(response)

View Source
@spec from_api_response(map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Creates a ResearchStatus from an OpenAI API response.

Link to this function

status_description(research_status)

View Source
@spec status_description(t()) :: String.t()

Gets a human-readable description of the current status.

@spec successful?(t()) :: boolean()

Checks if the research completed successfully.