All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| ollamaChat | POST /ollama/api/chat | Ollama Chat |
| ollamaEmbed | POST /ollama/api/embed | Ollama Embed |
| ollamaGenerate | POST /ollama/api/generate | Ollama Generate |
| ollamaHealthGet | GET /ollama/ | Ollama Health Get |
| ollamaHealthHead | HEAD /ollama/ | Ollama Health Head |
| ollamaListTags | GET /ollama/api/tags | Ollama List Tags |
| ollamaShowModel | POST /ollama/api/show | Ollama Show Model |
| ollamaVersion | GET /ollama/api/version | Ollama Version |
Object ollamaChat(ollamaChatRequest, ensureFullSentences, chatTemplate)
Ollama Chat
Generate a chat completion, similar to Ollama's /api/chat endpoint
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.OperationsCompatibleWithOllamaApisApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
OperationsCompatibleWithOllamaApisApi apiInstance = new OperationsCompatibleWithOllamaApisApi(defaultClient);
OllamaChatRequest ollamaChatRequest = new OllamaChatRequest(); // OllamaChatRequest |
Boolean ensureFullSentences = false; // Boolean | Whether to generate full sentences only
String chatTemplate = "chatTemplate_example"; // String | Override chat template for prompt formatting
try {
Object result = apiInstance.ollamaChat(ollamaChatRequest, ensureFullSentences, chatTemplate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OperationsCompatibleWithOllamaApisApi#ollamaChat");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ollamaChatRequest | OllamaChatRequest | ||
| ensureFullSentences | Boolean | Whether to generate full sentences only | [optional] [default to false] |
| chatTemplate | String | Override chat template for prompt formatting | [optional] |
Object
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
Object ollamaEmbed(ollamaEmbedRequest)
Ollama Embed
Create embeddings, similar to Ollama's /api/embed endpoint
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.OperationsCompatibleWithOllamaApisApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
OperationsCompatibleWithOllamaApisApi apiInstance = new OperationsCompatibleWithOllamaApisApi(defaultClient);
OllamaEmbedRequest ollamaEmbedRequest = new OllamaEmbedRequest(); // OllamaEmbedRequest |
try {
Object result = apiInstance.ollamaEmbed(ollamaEmbedRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OperationsCompatibleWithOllamaApisApi#ollamaEmbed");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ollamaEmbedRequest | OllamaEmbedRequest |
Object
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
Object ollamaGenerate(ollamaGenerateRequest, ensureFullSentences, chatTemplate)
Ollama Generate
Generate a completion, similar to Ollama's /api/generate endpoint
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.OperationsCompatibleWithOllamaApisApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
OperationsCompatibleWithOllamaApisApi apiInstance = new OperationsCompatibleWithOllamaApisApi(defaultClient);
OllamaGenerateRequest ollamaGenerateRequest = new OllamaGenerateRequest(); // OllamaGenerateRequest |
Boolean ensureFullSentences = false; // Boolean | Whether to generate full sentences only
String chatTemplate = "chatTemplate_example"; // String | Override chat template for prompt formatting
try {
Object result = apiInstance.ollamaGenerate(ollamaGenerateRequest, ensureFullSentences, chatTemplate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OperationsCompatibleWithOllamaApisApi#ollamaGenerate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ollamaGenerateRequest | OllamaGenerateRequest | ||
| ensureFullSentences | Boolean | Whether to generate full sentences only | [optional] [default to false] |
| chatTemplate | String | Override chat template for prompt formatting | [optional] |
Object
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
Object ollamaHealthGet()
Ollama Health Get
Health check, similar to Ollama's / endpoint (GET)
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.OperationsCompatibleWithOllamaApisApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
OperationsCompatibleWithOllamaApisApi apiInstance = new OperationsCompatibleWithOllamaApisApi(defaultClient);
try {
Object result = apiInstance.ollamaHealthGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OperationsCompatibleWithOllamaApisApi#ollamaHealthGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
Object
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
Object ollamaHealthHead()
Ollama Health Head
Health check, similar to Ollama's / endpoint (HEAD)
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.OperationsCompatibleWithOllamaApisApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
OperationsCompatibleWithOllamaApisApi apiInstance = new OperationsCompatibleWithOllamaApisApi(defaultClient);
try {
Object result = apiInstance.ollamaHealthHead();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OperationsCompatibleWithOllamaApisApi#ollamaHealthHead");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
Object
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
Object ollamaListTags()
Ollama List Tags
List available models, similar to Ollama's /api/tags endpoint
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.OperationsCompatibleWithOllamaApisApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
OperationsCompatibleWithOllamaApisApi apiInstance = new OperationsCompatibleWithOllamaApisApi(defaultClient);
try {
Object result = apiInstance.ollamaListTags();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OperationsCompatibleWithOllamaApisApi#ollamaListTags");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
Object
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
Object ollamaShowModel(ollamaShowRequest)
Ollama Show Model
Show model information, similar to Ollama's /api/show endpoint
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.OperationsCompatibleWithOllamaApisApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
OperationsCompatibleWithOllamaApisApi apiInstance = new OperationsCompatibleWithOllamaApisApi(defaultClient);
OllamaShowRequest ollamaShowRequest = new OllamaShowRequest(); // OllamaShowRequest |
try {
Object result = apiInstance.ollamaShowModel(ollamaShowRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OperationsCompatibleWithOllamaApisApi#ollamaShowModel");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ollamaShowRequest | OllamaShowRequest |
Object
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
Object ollamaVersion()
Ollama Version
Get the API version, similar to Ollama's /api/version endpoint
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.OperationsCompatibleWithOllamaApisApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
OperationsCompatibleWithOllamaApisApi apiInstance = new OperationsCompatibleWithOllamaApisApi(defaultClient);
try {
Object result = apiInstance.ollamaVersion();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OperationsCompatibleWithOllamaApisApi#ollamaVersion");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
Object
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |