All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetAllowedMimetypes | GET /rabbithole/allowed-mimetypes | Get Allowed Mimetypes |
UploadFile | POST /rabbithole | Upload File |
UploadMemory | POST /rabbithole/memory | Upload Memory |
UploadUrl | POST /rabbithole/web | Upload URL |
ResponseGetAllowedMimetypes GetAllowedMimetypes ()
Get Allowed Mimetypes
Retrieve the allowed mimetypes that can be ingested by the Rabbit Hole
using System.Collections.Generic;
using System.Diagnostics;
using CheshireCatApi.Api;
using CheshireCatApi.Client;
using CheshireCatApi.Model;
namespace Example
{
public class GetAllowedMimetypesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new RabbitHoleApi(config);
try
{
// Get Allowed Mimetypes
ResponseGetAllowedMimetypes result = apiInstance.GetAllowedMimetypes();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RabbitHoleApi.GetAllowedMimetypes: " + 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 Allowed Mimetypes
ApiResponse<ResponseGetAllowedMimetypes> response = apiInstance.GetAllowedMimetypesWithHttpInfo();
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 RabbitHoleApi.GetAllowedMimetypesWithHttpInfo: " + 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]
FileResponse UploadFile (System.IO.Stream file)
Upload File
Upload a file containing text (.txt, .md, .pdf, etc.). File content will be extracted and segmented into chunks. Chunks will be then vectorized and stored into documents memory.
using System.Collections.Generic;
using System.Diagnostics;
using CheshireCatApi.Api;
using CheshireCatApi.Client;
using CheshireCatApi.Model;
namespace Example
{
public class UploadFileExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new RabbitHoleApi(config);
var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream |
try
{
// Upload File
FileResponse result = apiInstance.UploadFile(file);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RabbitHoleApi.UploadFile: " + 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
{
// Upload File
ApiResponse<FileResponse> response = apiInstance.UploadFileWithHttpInfo(file);
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 RabbitHoleApi.UploadFileWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
file | System.IO.Stream****System.IO.Stream |
No authorization required
- Content-Type: multipart/form-data
- 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]
Object UploadMemory (System.IO.Stream file)
Upload Memory
Upload a memory json file to the cat memory
using System.Collections.Generic;
using System.Diagnostics;
using CheshireCatApi.Api;
using CheshireCatApi.Client;
using CheshireCatApi.Model;
namespace Example
{
public class UploadMemoryExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new RabbitHoleApi(config);
var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream |
try
{
// Upload Memory
Object result = apiInstance.UploadMemory(file);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RabbitHoleApi.UploadMemory: " + 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
{
// Upload Memory
ApiResponse<Object> response = apiInstance.UploadMemoryWithHttpInfo(file);
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 RabbitHoleApi.UploadMemoryWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
file | System.IO.Stream****System.IO.Stream |
Object
No authorization required
- Content-Type: multipart/form-data
- 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]
WebResponse UploadUrl (BodyUploadUrl bodyUploadUrl)
Upload URL
Upload a URL. Website content will be extracted and segmented into chunks. Chunks will be then vectorized and stored into documents memory.
using System.Collections.Generic;
using System.Diagnostics;
using CheshireCatApi.Api;
using CheshireCatApi.Client;
using CheshireCatApi.Model;
namespace Example
{
public class UploadUrlExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new RabbitHoleApi(config);
var bodyUploadUrl = new BodyUploadUrl(); // BodyUploadUrl |
try
{
// Upload URL
WebResponse result = apiInstance.UploadUrl(bodyUploadUrl);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RabbitHoleApi.UploadUrl: " + 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
{
// Upload URL
ApiResponse<WebResponse> response = apiInstance.UploadUrlWithHttpInfo(bodyUploadUrl);
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 RabbitHoleApi.UploadUrlWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
bodyUploadUrl | BodyUploadUrl |
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]