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
3 changes: 3 additions & 0 deletions mem0/configs/llms/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def __init__(
enable_vision: bool = False,
vision_details: Optional[str] = "auto",
http_client_proxies: Optional[dict] = None,
reasoning_effort: Optional[str] = None,
# Azure OpenAI-specific parameters
azure_kwargs: Optional[Dict[str, Any]] = None,
):
Expand All @@ -38,6 +39,7 @@ def __init__(
enable_vision: Enable vision capabilities, defaults to False
vision_details: Vision detail level, defaults to "auto"
http_client_proxies: HTTP client proxy settings, defaults to None
reasoning_effort: Reasoning level (low, medium, high), defaults to None
azure_kwargs: Azure-specific configuration, defaults to None
"""
# Initialize base parameters
Expand All @@ -54,4 +56,5 @@ def __init__(
)

# Azure OpenAI-specific parameters
self.reasoning_effort = reasoning_effort
self.azure_kwargs = AzureConfig(**(azure_kwargs or {}))
4 changes: 4 additions & 0 deletions mem0/configs/llms/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def __init__(
enable_vision: bool = False,
vision_details: Optional[str] = "auto",
http_client_proxies: Optional[dict] = None,
reasoning_effort: Optional[str] = None,
# OpenAI-specific parameters
openai_base_url: Optional[str] = None,
models: Optional[List[str]] = None,
Expand All @@ -45,12 +46,14 @@ def __init__(
enable_vision: Enable vision capabilities, defaults to False
vision_details: Vision detail level, defaults to "auto"
http_client_proxies: HTTP client proxy settings, defaults to None
reasoning_effort: Reasoning level (low, medium, high), defaults to None
openai_base_url: OpenAI API base URL, defaults to None
models: List of models for OpenRouter, defaults to None
route: OpenRouter route strategy, defaults to "fallback"
openrouter_base_url: OpenRouter base URL, defaults to None
site_url: Site URL for OpenRouter, defaults to None
app_name: Application name for OpenRouter, defaults to None
store: Store conversation, defaults to False
response_callback: Optional callback for monitoring LLM responses.
"""
# Initialize base parameters
Expand All @@ -67,6 +70,7 @@ def __init__(
)

# OpenAI-specific parameters
self.reasoning_effort = reasoning_effort
self.openai_base_url = openai_base_url
self.models = models
self.route = route
Expand Down
2 changes: 2 additions & 0 deletions mem0/llms/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def _get_supported_params(self, **kwargs) -> Dict:
supported_params["tools"] = kwargs["tools"]
if "tool_choice" in kwargs:
supported_params["tool_choice"] = kwargs["tool_choice"]
if hasattr(self.config, 'reasoning_effort') and self.config.reasoning_effort:
supported_params["reasoning_effort"] = self.config.reasoning_effort

return supported_params
else:
Expand Down