Home / Function/ get_current_weather() — langchain Function Reference

get_current_weather() — langchain Function Reference

Architecture documentation for the get_current_weather() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  75df7397_dfb1_bfc1_d6d0_cb2c0cdcbb22["get_current_weather()"]
  71dcb56e_a445_727d_c4bb_5dc733f24038["test_chat_models.py"]
  75df7397_dfb1_bfc1_d6d0_cb2c0cdcbb22 -->|defined in| 71dcb56e_a445_727d_c4bb_5dc733f24038
  style 75df7397_dfb1_bfc1_d6d0_cb2c0cdcbb22 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/ollama/tests/integration_tests/chat_models/test_chat_models.py lines 25–29

def get_current_weather(location: str) -> dict:
    """Gets the current weather in a given location."""
    if "boston" in location.lower():
        return {"temperature": "15°F", "conditions": "snow"}
    return {"temperature": "unknown", "conditions": "unknown"}

Domain

Subdomains

Frequently Asked Questions

What does get_current_weather() do?
get_current_weather() is a function in the langchain codebase, defined in libs/partners/ollama/tests/integration_tests/chat_models/test_chat_models.py.
Where is get_current_weather() defined?
get_current_weather() is defined in libs/partners/ollama/tests/integration_tests/chat_models/test_chat_models.py at line 25.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free