All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetEmbedderSettings | GET /embedder/settings/{languageEmbedderName} | Get Embedder Settings |
GetEmbeddersSettings | GET /embedder/settings | Get Embedders Settings |
UpsertEmbedderSetting | PUT /embedder/settings/{languageEmbedderName} | Upsert Embedder Setting |
Setting GetEmbedderSettings (string languageEmbedderName)
Get Embedder Settings
Get settings and schema of the specified Embedder
using System.Collections.Generic;
using System.Diagnostics;
using CheshireCatApi.Api;
using CheshireCatApi.Client;
using CheshireCatApi.Model;
namespace Example
{
public class GetEmbedderSettingsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new EmbedderApi(config);
var languageEmbedderName = "languageEmbedderName_example"; // string |
try
{
// Get Embedder Settings
Setting result = apiInstance.GetEmbedderSettings(languageEmbedderName);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmbedderApi.GetEmbedderSettings: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Embedder Settings
ApiResponse<Setting> response = apiInstance.GetEmbedderSettingsWithHttpInfo(languageEmbedderName);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmbedderApi.GetEmbedderSettingsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
languageEmbedderName | string |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SettingsResponse GetEmbeddersSettings ()
Get Embedders Settings
Get the list of the Embedders
using System.Collections.Generic;
using System.Diagnostics;
using CheshireCatApi.Api;
using CheshireCatApi.Client;
using CheshireCatApi.Model;
namespace Example
{
public class GetEmbeddersSettingsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new EmbedderApi(config);
try
{
// Get Embedders Settings
SettingsResponse result = apiInstance.GetEmbeddersSettings();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmbedderApi.GetEmbeddersSettings: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Embedders Settings
ApiResponse<SettingsResponse> response = apiInstance.GetEmbeddersSettingsWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmbedderApi.GetEmbeddersSettingsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Setting UpsertEmbedderSetting (string languageEmbedderName, Object body)
Upsert Embedder Setting
Upsert the Embedder setting
using System.Collections.Generic;
using System.Diagnostics;
using CheshireCatApi.Api;
using CheshireCatApi.Client;
using CheshireCatApi.Model;
namespace Example
{
public class UpsertEmbedderSettingExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new EmbedderApi(config);
var languageEmbedderName = "languageEmbedderName_example"; // string |
var body = {"openai_api_key":"your-key-here"}; // Object |
try
{
// Upsert Embedder Setting
Setting result = apiInstance.UpsertEmbedderSetting(languageEmbedderName, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmbedderApi.UpsertEmbedderSetting: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Upsert Embedder Setting
ApiResponse<Setting> response = apiInstance.UpsertEmbedderSettingWithHttpInfo(languageEmbedderName, body);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmbedderApi.UpsertEmbedderSettingWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
languageEmbedderName | string | ||
body | Object |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]