-
Couldn't load subscription status.
- Fork 9
Ollama.cs
suncloudsmoon edited this page Dec 8, 2024
·
1 revision
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.
-
Show(string modelName, bool verbose = false):
Sends a POST request to the Ollama API's show endpoint to retrieve information about the specified model. ThemodelNameparameter specifies the name of the model to query, and the optionalverboseparameter determines the level of detail in the response. The method returns a dictionary containing the response data.
-
_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").
-
constructor(Uri endpoint):
Initializes a new instance of theOllamaclass with the specified base endpoint URI.