Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions lib/chat_models/reasoning_options.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ defmodule LangChain.ChatModels.ReasoningOptions do

## Fields

- `effort` - Constrains effort on reasoning. Supported values: :minimal, :low, :medium, :high
- `effort` - Constrains effort on reasoning. Supported values: :none, :minimal, :low, :medium,
:high, :xhigh
- `generate_summary` - (Deprecated) A summary of the reasoning performed. Use `summary` instead.
- `summary` - A summary of the reasoning performed. Supported values: :auto, :concise, :detailed
"""
Expand All @@ -17,7 +18,11 @@ defmodule LangChain.ChatModels.ReasoningOptions do
@primary_key false

embedded_schema do
field(:effort, Ecto.Enum, values: [:minimal, :low, :medium, :high], default: nil)
field(:effort, Ecto.Enum,
values: [:none, :minimal, :low, :medium, :high, :xhigh],
default: nil
)

field(:generate_summary, Ecto.Enum, values: [:auto, :concise, :detailed], default: nil)
field(:summary, Ecto.Enum, values: [:auto, :concise, :detailed], default: nil)
end
Expand Down Expand Up @@ -85,8 +90,10 @@ defmodule LangChain.ChatModels.ReasoningOptions do

@doc """
Returns the list of valid effort values.

Different models allow different reasoning effort values. Consult the OpenAI docs.
"""
def valid_efforts, do: [:minimal, :low, :medium, :high]
def valid_efforts, do: [:none, :minimal, :low, :medium, :high, :xhigh]

@doc """
Returns the list of valid summary values.
Expand Down