Skip to content

Ollama.cs

suncloudsmoon edited this page Dec 8, 2024 · 1 revision

Overview

The Ollama class is designed to interact with the Ollama service's API to retrieve information about models. It acts as a client, sending requests to a specified endpoint and handling the responses. This class is internal, meaning it is intended for use within the same assembly.

Public Members

Functions

  • Show(string modelName, bool verbose = false):
    Sends a POST request to the Ollama API's show endpoint to retrieve information about the specified model. The modelName parameter specifies the name of the model to query, and the optional verbose parameter determines the level of detail in the response. The method returns a dictionary containing the response data.

Private Members

Variables

  • _endpoint:
    Stores the base URI of the Ollama service, provided through the constructor.

  • _showApiRelativeUri:
    A static readonly URI representing the relative path to the show API endpoint ("api/show").

Functions

  • constructor(Uri endpoint):
    Initializes a new instance of the Ollama class with the specified base endpoint URI.
Clone this wiki locally