Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions swarms/structs/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
from swarms.utils.formatter import formatter
from swarms.utils.generate_id import generate_id
from swarms.utils.generate_keys import generate_api_key
from swarms.utils.get_reasoning_efforts import get_reasoning_efforts
from swarms.utils.get_reasoning_efforts import ReasoningEffort
from swarms.utils.history_output_formatter import (
history_output_formatter,
)
Expand Down Expand Up @@ -391,7 +391,7 @@ def __init__(
reasoning_prompt_on: bool = True,
dynamic_context_window: bool = True,
show_tool_execution_output: bool = True,
reasoning_effort: Literal[get_reasoning_efforts()] = None,
reasoning_effort: Optional[ReasoningEffort] = None,
thinking_tokens: int = 1024,
think_tool: bool = False,
dynamic_tools: bool = True,
Expand Down
10 changes: 6 additions & 4 deletions swarms/utils/get_reasoning_efforts.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import inspect
from functools import lru_cache
from typing import Tuple, get_args
from typing import Literal, Tuple, get_args

# Fallback set, unioned with installed litellm's values so supported efforts are never reduced.
REASONING_EFFORTS: Tuple[str, ...] = (
ReasoningEffort = Literal[
"none",
"minimal",
"low",
Expand All @@ -13,7 +12,10 @@
"ultra",
"max",
"None",
)
]

# Fallback set, unioned with installed litellm's values so supported efforts are never reduced.
REASONING_EFFORTS: Tuple[str, ...] = get_args(ReasoningEffort)


@lru_cache(maxsize=1)
Expand Down
Loading