SYMBOL INDEX (293 symbols across 23 files) FILE: examples/async-chat.py function main (line 6) | async def main(): FILE: examples/async-generate.py function main (line 6) | async def main(): FILE: examples/async-structured-outputs.py class FriendInfo (line 9) | class FriendInfo(BaseModel): class FriendList (line 15) | class FriendList(BaseModel): function main (line 19) | async def main(): FILE: examples/async-tools.py function add_two_numbers (line 7) | def add_two_numbers(a: int, b: int) -> int: function subtract_two_numbers (line 21) | def subtract_two_numbers(a: int, b: int) -> int: function main (line 54) | async def main(): FILE: examples/chat-logprobs.py function print_logprobs (line 6) | def print_logprobs(logprobs: Iterable[dict], label: str) -> None: FILE: examples/generate-logprobs.py function print_logprobs (line 6) | def print_logprobs(logprobs: Iterable[dict], label: str) -> None: FILE: examples/gpt-oss-tools-stream.py function get_weather (line 18) | def get_weather(city: str) -> str: function get_weather_conditions (line 35) | def get_weather_conditions(city: str) -> str: FILE: examples/gpt-oss-tools.py function get_weather (line 17) | def get_weather(city: str) -> str: function get_weather_conditions (line 34) | def get_weather_conditions(city: str) -> str: FILE: examples/multi-tool.py function get_temperature (line 7) | def get_temperature(city: str) -> int: function get_conditions (line 26) | def get_conditions(city: str) -> str: FILE: examples/structured-outputs-image.py class Object (line 10) | class Object(BaseModel): class ImageDescription (line 16) | class ImageDescription(BaseModel): FILE: examples/structured-outputs.py class FriendInfo (line 7) | class FriendInfo(BaseModel): class FriendList (line 13) | class FriendList(BaseModel): FILE: examples/thinking-levels.py function heading (line 4) | def heading(text): FILE: examples/tools.py function add_two_numbers (line 4) | def add_two_numbers(a: int, b: int) -> int: function subtract_two_numbers (line 21) | def subtract_two_numbers(a: int, b: int) -> int: FILE: examples/web-search-gpt-oss.py function main (line 14) | def main() -> None: FILE: examples/web-search-mcp.py function _web_search_impl (line 40) | def _web_search_impl(query: str, max_results: int = 3) -> Dict[str, Any]: function _web_fetch_impl (line 45) | def _web_fetch_impl(url: str) -> Dict[str, Any]: function web_search (line 54) | def web_search(query: str, max_results: int = 3) -> Dict[str, Any]: function web_fetch (line 69) | def web_fetch(url: str) -> Dict[str, Any]: function web_search (line 89) | async def web_search(query: str, max_results: int = 3) -> Dict[str, Any]: function web_fetch (line 101) | async def web_fetch(url: str) -> Dict[str, Any]: function _main (line 111) | async def _main() -> None: FILE: examples/web-search.py function format_tool_results (line 15) | def format_tool_results( FILE: examples/web_search_gpt_oss_helper.py class Page (line 13) | class Page: class BrowserStateData (line 23) | class BrowserStateData: class WebSearchResult (line 30) | class WebSearchResult: class SearchClient (line 36) | class SearchClient(Protocol): method search (line 37) | def search(self, queries: List[str], max_results: Optional[int] = None... class CrawlClient (line 40) | class CrawlClient(Protocol): method crawl (line 41) | def crawl(self, urls: List[str]): ... function cap_tool_content (line 52) | def cap_tool_content(text: str) -> str: function _safe_domain (line 62) | def _safe_domain(u: str) -> str: class BrowserState (line 74) | class BrowserState: method __init__ (line 75) | def __init__(self, initial_state: Optional[BrowserStateData] = None): method get_data (line 78) | def get_data(self) -> BrowserStateData: method set_data (line 81) | def set_data(self, data: BrowserStateData) -> None: class Browser (line 88) | class Browser: method __init__ (line 89) | def __init__( method set_client (line 97) | def set_client(self, client: Client) -> None: method get_state (line 100) | def get_state(self) -> BrowserStateData: method _save_page (line 105) | def _save_page(self, page: Page) -> None: method _page_from_stack (line 111) | def _page_from_stack(self, url: str) -> Page: method _join_lines_with_numbers (line 118) | def _join_lines_with_numbers(self, lines: List[str]) -> str: method _wrap_lines (line 124) | def _wrap_lines(self, text: str, width: int = 80) -> List[str]: method _process_markdown_links (line 151) | def _process_markdown_links(self, text: str) -> Tuple[str, Dict[int, s... method _get_end_loc (line 174) | def _get_end_loc(self, loc: int, num_lines: int, total_lines: int, lin... method _display_page (line 183) | def _display_page(self, page: Page, cursor: int, loc: int, num_lines: ... method _build_search_results_page_collection (line 208) | def _build_search_results_page_collection(self, query: str, results: D... method _build_search_result_page (line 242) | def _build_search_result_page(self, result: WebSearchResult, link_idx:... method _build_page_from_fetch (line 271) | def _build_page_from_fetch(self, requested_url: str, fetch_response: D... method _build_find_results_page (line 302) | def _build_find_results_page(self, pattern: str, page: Page) -> Page: method search (line 343) | def search(self, *, query: str, topn: int = 5) -> Dict[str, Any]: method open (line 381) | def open( method find (line 497) | def find(self, *, pattern: str, cursor: int = -1) -> Dict[str, Any]: FILE: ollama/_client.py class BaseClient (line 79) | class BaseClient(contextlib.AbstractContextManager, contextlib.AbstractA... method __init__ (line 80) | def __init__( method __exit__ (line 120) | def __exit__(self, exc_type, exc_val, exc_tb): method __aexit__ (line 123) | async def __aexit__(self, exc_type, exc_val, exc_tb): class Client (line 130) | class Client(BaseClient): method __init__ (line 131) | def __init__(self, host: Optional[str] = None, **kwargs) -> None: method close (line 134) | def close(self): method _request_raw (line 137) | def _request_raw(self, *args, **kwargs): method _request (line 148) | def _request( method _request (line 157) | def _request( method _request (line 166) | def _request( method _request (line 174) | def _request( method generate (line 202) | def generate( method generate (line 226) | def generate( method generate (line 249) | def generate( method chat (line 309) | def chat( method chat (line 325) | def chat( method chat (line 340) | def chat( method embed (line 406) | def embed( method embeddings (line 429) | def embeddings( method pull (line 452) | def pull( method pull (line 461) | def pull( method pull (line 469) | def pull( method push (line 494) | def push( method push (line 503) | def push( method push (line 511) | def push( method create (line 536) | def create( method create (line 553) | def create( method create (line 569) | def create( method create_blob (line 609) | def create_blob(self, path: Union[str, Path]) -> str: method list (line 625) | def list(self) -> ListResponse: method delete (line 632) | def delete(self, model: str) -> StatusResponse: method copy (line 644) | def copy(self, source: str, destination: str) -> StatusResponse: method show (line 657) | def show(self, model: str) -> ShowResponse: method ps (line 667) | def ps(self) -> ProcessResponse: method web_search (line 674) | def web_search(self, query: str, max_results: int = 3) -> WebSearchRes... method web_fetch (line 700) | def web_fetch(self, url: str) -> WebFetchResponse: class AsyncClient (line 723) | class AsyncClient(BaseClient): method __init__ (line 724) | def __init__(self, host: Optional[str] = None, **kwargs) -> None: method close (line 727) | async def close(self): method _request_raw (line 730) | async def _request_raw(self, *args, **kwargs): method _request (line 741) | async def _request( method _request (line 750) | async def _request( method _request (line 759) | async def _request( method _request (line 767) | async def _request( method web_search (line 794) | async def web_search(self, query: str, max_results: int = 3) -> WebSea... method web_fetch (line 815) | async def web_fetch(self, url: str) -> WebFetchResponse: method generate (line 835) | async def generate( method generate (line 859) | async def generate( method generate (line 882) | async def generate( method chat (line 941) | async def chat( method chat (line 957) | async def chat( method chat (line 972) | async def chat( method embed (line 1039) | async def embed( method embeddings (line 1062) | async def embeddings( method pull (line 1085) | async def pull( method pull (line 1094) | async def pull( method pull (line 1102) | async def pull( method push (line 1127) | async def push( method push (line 1136) | async def push( method push (line 1144) | async def push( method create (line 1169) | async def create( method create (line 1186) | async def create( method create (line 1202) | async def create( method create_blob (line 1243) | async def create_blob(self, path: Union[str, Path]) -> str: method list (line 1266) | async def list(self) -> ListResponse: method delete (line 1273) | async def delete(self, model: str) -> StatusResponse: method copy (line 1285) | async def copy(self, source: str, destination: str) -> StatusResponse: method show (line 1298) | async def show(self, model: str) -> ShowResponse: method ps (line 1308) | async def ps(self) -> ProcessResponse: function _copy_images (line 1316) | def _copy_images(images: Optional[Sequence[Union[Image, Any]]]) -> Itera... function _copy_messages (line 1321) | def _copy_messages(messages: Optional[Sequence[Union[Mapping[str, Any], ... function _copy_tools (line 1328) | def _copy_tools(tools: Optional[Sequence[Union[Mapping[str, Any], Tool, ... function _as_path (line 1333) | def _as_path(s: Optional[Union[str, PathLike]]) -> Union[Path, None]: function _parse_host (line 1343) | def _parse_host(host: Optional[str]) -> str: FILE: ollama/_types.py class SubscriptableBaseModel (line 19) | class SubscriptableBaseModel(BaseModel): method __getitem__ (line 20) | def __getitem__(self, key: str) -> Any: method __setitem__ (line 35) | def __setitem__(self, key: str, value: Any) -> None: method __contains__ (line 49) | def __contains__(self, key: str) -> bool: method get (line 87) | def get(self, key: str, default: Any = None) -> Any: class Options (line 104) | class Options(SubscriptableBaseModel): class BaseRequest (line 140) | class BaseRequest(SubscriptableBaseModel): class BaseStreamableRequest (line 145) | class BaseStreamableRequest(BaseRequest): class BaseGenerateRequest (line 150) | class BaseGenerateRequest(BaseStreamableRequest): class Image (line 161) | class Image(BaseModel): method serialize_model (line 165) | def serialize_model(self): class GenerateRequest (line 189) | class GenerateRequest(BaseGenerateRequest): class BaseGenerateResponse (line 230) | class BaseGenerateResponse(SubscriptableBaseModel): class TokenLogprob (line 262) | class TokenLogprob(SubscriptableBaseModel): class Logprob (line 270) | class Logprob(TokenLogprob): class GenerateResponse (line 275) | class GenerateResponse(BaseGenerateResponse): class Message (line 304) | class Message(SubscriptableBaseModel): class ToolCall (line 333) | class ToolCall(SubscriptableBaseModel): class Function (line 338) | class Function(SubscriptableBaseModel): class Tool (line 358) | class Tool(SubscriptableBaseModel): class Function (line 361) | class Function(SubscriptableBaseModel): class Parameters (line 365) | class Parameters(SubscriptableBaseModel): class Property (line 372) | class Property(SubscriptableBaseModel): class ChatRequest (line 387) | class ChatRequest(BaseGenerateRequest): method serialize_model (line 389) | def serialize_model(self, nxt): class ChatResponse (line 413) | class ChatResponse(BaseGenerateResponse): class EmbedRequest (line 425) | class EmbedRequest(BaseRequest): class EmbedResponse (line 441) | class EmbedResponse(BaseGenerateResponse): class EmbeddingsRequest (line 450) | class EmbeddingsRequest(BaseRequest): class EmbeddingsResponse (line 460) | class EmbeddingsResponse(SubscriptableBaseModel): class PullRequest (line 469) | class PullRequest(BaseStreamableRequest): class PushRequest (line 478) | class PushRequest(BaseStreamableRequest): class CreateRequest (line 487) | class CreateRequest(BaseStreamableRequest): method serialize_model (line 489) | def serialize_model(self, nxt): class ModelDetails (line 509) | class ModelDetails(SubscriptableBaseModel): class ListResponse (line 518) | class ListResponse(SubscriptableBaseModel): class Model (line 519) | class Model(SubscriptableBaseModel): class DeleteRequest (line 530) | class DeleteRequest(BaseRequest): class CopyRequest (line 536) | class CopyRequest(BaseModel): class StatusResponse (line 548) | class StatusResponse(SubscriptableBaseModel): class ProgressResponse (line 552) | class ProgressResponse(StatusResponse): class ShowRequest (line 558) | class ShowRequest(BaseRequest): class ShowResponse (line 564) | class ShowResponse(SubscriptableBaseModel): class ProcessResponse (line 582) | class ProcessResponse(SubscriptableBaseModel): class Model (line 583) | class Model(SubscriptableBaseModel): class WebSearchRequest (line 596) | class WebSearchRequest(SubscriptableBaseModel): class WebSearchResult (line 601) | class WebSearchResult(SubscriptableBaseModel): class WebFetchRequest (line 607) | class WebFetchRequest(SubscriptableBaseModel): class WebSearchResponse (line 611) | class WebSearchResponse(SubscriptableBaseModel): class WebFetchResponse (line 615) | class WebFetchResponse(SubscriptableBaseModel): class RequestError (line 621) | class RequestError(Exception): method __init__ (line 626) | def __init__(self, error: str): class ResponseError (line 632) | class ResponseError(Exception): method __init__ (line 637) | def __init__(self, error: str, status_code: int = -1): method __str__ (line 650) | def __str__(self) -> str: FILE: ollama/_utils.py function _parse_docstring (line 13) | def _parse_docstring(doc_string: Union[str, None]) -> dict[str, str]: function convert_function_to_tool (line 56) | def convert_function_to_tool(func: Callable) -> Tool: FILE: tests/test_client.py function anyio_backend (line 25) | def anyio_backend(): class PrefixPattern (line 29) | class PrefixPattern(URIPattern): method __init__ (line 30) | def __init__(self, prefix: str): method match (line 33) | def match(self, uri): function test_client_chat (line 37) | def test_client_chat(httpserver: HTTPServer): function test_client_chat_with_logprobs (line 64) | def test_client_chat_with_logprobs(httpserver: HTTPServer): function test_client_chat_stream (line 102) | def test_client_chat_stream(httpserver: HTTPServer): function test_client_chat_images (line 143) | def test_client_chat_images(httpserver: HTTPServer, message_format: str,... function test_client_chat_format_json (line 193) | def test_client_chat_format_json(httpserver: HTTPServer): function test_client_chat_format_pydantic (line 221) | def test_client_chat_format_pydantic(httpserver: HTTPServer): function test_async_client_chat_format_json (line 253) | async def test_async_client_chat_format_json(httpserver: HTTPServer): function test_async_client_chat_format_pydantic (line 281) | async def test_async_client_chat_format_pydantic(httpserver: HTTPServer): function test_client_generate (line 313) | def test_client_generate(httpserver: HTTPServer): function test_client_generate_with_logprobs (line 335) | def test_client_generate_with_logprobs(httpserver: HTTPServer): function test_client_generate_with_image_type (line 369) | def test_client_generate_with_image_type(httpserver: HTTPServer): function test_client_generate_with_invalid_image (line 392) | def test_client_generate_with_invalid_image(httpserver: HTTPServer): function test_client_generate_stream (line 409) | def test_client_generate_stream(httpserver: HTTPServer): function test_client_generate_images (line 444) | def test_client_generate_images(httpserver: HTTPServer): function test_client_generate_format_json (line 471) | def test_client_generate_format_json(httpserver: HTTPServer): function test_client_generate_format_pydantic (line 494) | def test_client_generate_format_pydantic(httpserver: HTTPServer): function test_async_client_generate_format_json (line 521) | async def test_async_client_generate_format_json(httpserver: HTTPServer): function test_async_client_generate_format_pydantic (line 544) | async def test_async_client_generate_format_pydantic(httpserver: HTTPSer... function test_client_generate_image (line 571) | def test_client_generate_image(httpserver: HTTPServer): function test_client_generate_image_stream (line 599) | def test_client_generate_image_stream(httpserver: HTTPServer): function test_async_client_generate_image (line 655) | async def test_async_client_generate_image(httpserver: HTTPServer): function test_client_pull (line 680) | def test_client_pull(httpserver: HTTPServer): function test_client_pull_stream (line 696) | def test_client_pull_stream(httpserver: HTTPServer): function test_client_push (line 725) | def test_client_push(httpserver: HTTPServer): function test_client_push_stream (line 741) | def test_client_push_stream(httpserver: HTTPServer): function userhomedir (line 769) | def userhomedir(): function test_client_create_with_blob (line 777) | def test_client_create_with_blob(httpserver: HTTPServer): function test_client_create_with_parameters_roundtrip (line 795) | def test_client_create_with_parameters_roundtrip(httpserver: HTTPServer): function test_client_create_from_library (line 831) | def test_client_create_from_library(httpserver: HTTPServer): function test_client_create_blob (line 848) | def test_client_create_blob(httpserver: HTTPServer): function test_client_create_blob_exists (line 858) | def test_client_create_blob_exists(httpserver: HTTPServer): function test_client_delete (line 868) | def test_client_delete(httpserver: HTTPServer): function test_client_copy (line 875) | def test_client_copy(httpserver: HTTPServer): function test_async_client_chat (line 882) | async def test_async_client_chat(httpserver: HTTPServer): function test_async_client_chat_stream (line 909) | async def test_async_client_chat_stream(httpserver: HTTPServer): function test_async_client_chat_images (line 948) | async def test_async_client_chat_images(httpserver: HTTPServer): function test_async_client_generate (line 982) | async def test_async_client_generate(httpserver: HTTPServer): function test_async_client_generate_stream (line 1004) | async def test_async_client_generate_stream(httpserver: HTTPServer): function test_async_client_generate_images (line 1039) | async def test_async_client_generate_images(httpserver: HTTPServer): function test_async_client_pull (line 1066) | async def test_async_client_pull(httpserver: HTTPServer): function test_async_client_pull_stream (line 1082) | async def test_async_client_pull_stream(httpserver: HTTPServer): function test_async_client_push (line 1111) | async def test_async_client_push(httpserver: HTTPServer): function test_async_client_push_stream (line 1127) | async def test_async_client_push_stream(httpserver: HTTPServer): function test_async_client_create_with_blob (line 1154) | async def test_async_client_create_with_blob(httpserver: HTTPServer): function test_async_client_create_with_parameters_roundtrip (line 1172) | async def test_async_client_create_with_parameters_roundtrip(httpserver:... function test_async_client_create_from_library (line 1208) | async def test_async_client_create_from_library(httpserver: HTTPServer): function test_async_client_create_blob (line 1225) | async def test_async_client_create_blob(httpserver: HTTPServer): function test_async_client_create_blob_exists (line 1235) | async def test_async_client_create_blob_exists(httpserver: HTTPServer): function test_async_client_delete (line 1245) | async def test_async_client_delete(httpserver: HTTPServer): function test_async_client_copy (line 1252) | async def test_async_client_copy(httpserver: HTTPServer): function test_headers (line 1259) | def test_headers(): function test_copy_tools (line 1275) | def test_copy_tools(): function test_tool_validation (line 1319) | def test_tool_validation(): function test_client_connection_error (line 1327) | def test_client_connection_error(): function test_async_client_connection_error (line 1340) | async def test_async_client_connection_error(): function test_arbitrary_roles_accepted_in_message (line 1353) | def test_arbitrary_roles_accepted_in_message(): function _mock_request (line 1357) | def _mock_request(*args: Any, **kwargs: Any) -> Response: function test_arbitrary_roles_accepted_in_message_request (line 1361) | def test_arbitrary_roles_accepted_in_message_request(monkeypatch: pytest... function _mock_request_async (line 1369) | async def _mock_request_async(*args: Any, **kwargs: Any) -> Response: function test_arbitrary_roles_accepted_in_message_request_async (line 1373) | async def test_arbitrary_roles_accepted_in_message_request_async(monkeyp... function test_client_web_search_requires_bearer_auth_header (line 1381) | def test_client_web_search_requires_bearer_auth_header(monkeypatch: pyte... function test_client_web_fetch_requires_bearer_auth_header (line 1390) | def test_client_web_fetch_requires_bearer_auth_header(monkeypatch: pytes... function _mock_request_web_search (line 1399) | def _mock_request_web_search(self, cls, method, url, json=None, **kwargs): function _mock_request_web_fetch (line 1406) | def _mock_request_web_fetch(self, cls, method, url, json=None, **kwargs): function test_client_web_search_with_env_api_key (line 1413) | def test_client_web_search_with_env_api_key(monkeypatch: pytest.MonkeyPa... function test_client_web_fetch_with_env_api_key (line 1421) | def test_client_web_fetch_with_env_api_key(monkeypatch: pytest.MonkeyPat... function test_client_web_search_with_explicit_bearer_header (line 1429) | def test_client_web_search_with_explicit_bearer_header(monkeypatch: pyte... function test_client_web_fetch_with_explicit_bearer_header (line 1437) | def test_client_web_fetch_with_explicit_bearer_header(monkeypatch: pytes... function test_client_bearer_header_from_env (line 1445) | def test_client_bearer_header_from_env(monkeypatch: pytest.MonkeyPatch): function test_client_explicit_bearer_header_overrides_env (line 1452) | def test_client_explicit_bearer_header_overrides_env(monkeypatch: pytest... function test_client_close (line 1461) | def test_client_close(): function test_async_client_close (line 1468) | async def test_async_client_close(): function test_client_context_manager (line 1474) | def test_client_context_manager(): function test_async_client_context_manager (line 1483) | async def test_async_client_context_manager(): FILE: tests/test_type_serialization.py function test_image_serialization_bytes (line 10) | def test_image_serialization_bytes(): function test_image_serialization_base64_string (line 17) | def test_image_serialization_base64_string(): function test_image_serialization_long_base64_string (line 23) | def test_image_serialization_long_base64_string(): function test_image_serialization_plain_string (line 29) | def test_image_serialization_plain_string(): function test_image_serialization_path (line 34) | def test_image_serialization_path(): function test_image_serialization_string_path (line 42) | def test_image_serialization_string_path(): function test_create_request_serialization (line 58) | def test_create_request_serialization(): function test_create_request_serialization_exclude_none_true (line 73) | def test_create_request_serialization_exclude_none_true(): function test_create_request_serialization_exclude_none_false (line 82) | def test_create_request_serialization_exclude_none_false(): function test_create_request_serialization_license_list (line 91) | def test_create_request_serialization_license_list(): FILE: tests/test_utils.py function test_function_to_tool_conversion (line 8) | def test_function_to_tool_conversion(): function test_function_with_no_args (line 31) | def test_function_with_no_args(): function test_function_with_all_types (line 47) | def test_function_with_all_types(): function test_function_docstring_parsing (line 116) | def test_function_docstring_parsing(): function test_skewed_docstring_parsing (line 140) | def test_skewed_docstring_parsing(): function test_function_with_no_docstring (line 160) | def test_function_with_no_docstring(): function test_function_with_only_description (line 174) | def test_function_with_only_description(): function test_function_with_yields (line 203) | def test_function_with_yields(): function test_function_with_no_types (line 222) | def test_function_with_no_types(): function test_function_with_parentheses (line 233) | def test_function_with_parentheses():