All URIs are relative to http://localhost:4000
| Method | HTTP request | Description |
|---|---|---|
| dreamcatcher_web_endpoint_controller_index | GET /api/v1/endpoints | List endpoints |
| dreamcatcher_web_endpoint_controller_invoke_chat_completions | POST /api/v1/endpoints/{endpoint_name}/openai/v1/chat/completions | Invoke a chat completion |
| dreamcatcher_web_endpoint_controller_invoke_completions | POST /api/v1/endpoints/{endpoint_name}/openai/v1/completions | Invoke a completion |
| dreamcatcher_web_endpoint_controller_models | GET /api/v1/endpoints/{endpoint_name}/openai/v1/models | Lists upstreams (ie models) for an endpoint |
| dreamcatcher_web_endpoint_controller_show | GET /api/v1/endpoints/{id} | Get an endpoint |
List[ListEndpointResponseInner] dreamcatcher_web_endpoint_controller_index()
List endpoints
- Bearer Authentication (authorization):
import time
import os
import dreamcatcher
from dreamcatcher.models.list_endpoint_response_inner import ListEndpointResponseInner
from dreamcatcher.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:4000
# See configuration.py for a list of all supported configuration parameters.
configuration = dreamcatcher.Configuration(
host = "http://localhost:4000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: authorization
configuration = dreamcatcher.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with dreamcatcher.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = dreamcatcher.EndpointsApi(api_client)
try:
# List endpoints
api_response = api_instance.dreamcatcher_web_endpoint_controller_index()
print("The response of EndpointsApi->dreamcatcher_web_endpoint_controller_index:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EndpointsApi->dreamcatcher_web_endpoint_controller_index: %s\n" % e)This endpoint does not need any parameter.
List[ListEndpointResponseInner]
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List endpoints response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChatCompletionResponse dreamcatcher_web_endpoint_controller_invoke_chat_completions(endpoint_name, create_chat_completion=create_chat_completion)
Invoke a chat completion
- Bearer Authentication (authorization):
import time
import os
import dreamcatcher
from dreamcatcher.models.chat_completion_response import ChatCompletionResponse
from dreamcatcher.models.create_chat_completion import CreateChatCompletion
from dreamcatcher.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:4000
# See configuration.py for a list of all supported configuration parameters.
configuration = dreamcatcher.Configuration(
host = "http://localhost:4000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: authorization
configuration = dreamcatcher.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with dreamcatcher.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = dreamcatcher.EndpointsApi(api_client)
endpoint_name = 'demo-endpoint' # str | Endpoint name
create_chat_completion = dreamcatcher.CreateChatCompletion() # CreateChatCompletion | Chat completion params (optional)
try:
# Invoke a chat completion
api_response = api_instance.dreamcatcher_web_endpoint_controller_invoke_chat_completions(endpoint_name, create_chat_completion=create_chat_completion)
print("The response of EndpointsApi->dreamcatcher_web_endpoint_controller_invoke_chat_completions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EndpointsApi->dreamcatcher_web_endpoint_controller_invoke_chat_completions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| endpoint_name | str | Endpoint name | |
| create_chat_completion | CreateChatCompletion | Chat completion params | [optional] |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Chat completion response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CompletionResponse dreamcatcher_web_endpoint_controller_invoke_completions(endpoint_name, completion=completion)
Invoke a completion
- Bearer Authentication (authorization):
import time
import os
import dreamcatcher
from dreamcatcher.models.completion import Completion
from dreamcatcher.models.completion_response import CompletionResponse
from dreamcatcher.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:4000
# See configuration.py for a list of all supported configuration parameters.
configuration = dreamcatcher.Configuration(
host = "http://localhost:4000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: authorization
configuration = dreamcatcher.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with dreamcatcher.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = dreamcatcher.EndpointsApi(api_client)
endpoint_name = 'demo-endpoint' # str | Endpoint name
completion = dreamcatcher.Completion() # Completion | Completion params (optional)
try:
# Invoke a completion
api_response = api_instance.dreamcatcher_web_endpoint_controller_invoke_completions(endpoint_name, completion=completion)
print("The response of EndpointsApi->dreamcatcher_web_endpoint_controller_invoke_completions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EndpointsApi->dreamcatcher_web_endpoint_controller_invoke_completions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| endpoint_name | str | Endpoint name | |
| completion | Completion | Completion params | [optional] |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Completion response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListModelsResponse dreamcatcher_web_endpoint_controller_models(endpoint_name)
Lists upstreams (ie models) for an endpoint
- Bearer Authentication (authorization):
import time
import os
import dreamcatcher
from dreamcatcher.models.list_models_response import ListModelsResponse
from dreamcatcher.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:4000
# See configuration.py for a list of all supported configuration parameters.
configuration = dreamcatcher.Configuration(
host = "http://localhost:4000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: authorization
configuration = dreamcatcher.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with dreamcatcher.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = dreamcatcher.EndpointsApi(api_client)
endpoint_name = 'demo-endpoint' # str | Endpoint name
try:
# Lists upstreams (ie models) for an endpoint
api_response = api_instance.dreamcatcher_web_endpoint_controller_models(endpoint_name)
print("The response of EndpointsApi->dreamcatcher_web_endpoint_controller_models:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EndpointsApi->dreamcatcher_web_endpoint_controller_models: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| endpoint_name | str | Endpoint name |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List models response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShowEndpointResponse dreamcatcher_web_endpoint_controller_show(id)
Get an endpoint
- Bearer Authentication (authorization):
import time
import os
import dreamcatcher
from dreamcatcher.models.show_endpoint_response import ShowEndpointResponse
from dreamcatcher.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:4000
# See configuration.py for a list of all supported configuration parameters.
configuration = dreamcatcher.Configuration(
host = "http://localhost:4000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: authorization
configuration = dreamcatcher.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with dreamcatcher.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = dreamcatcher.EndpointsApi(api_client)
id = 'demo-endpoint' # str | Endpoint name
try:
# Get an endpoint
api_response = api_instance.dreamcatcher_web_endpoint_controller_show(id)
print("The response of EndpointsApi->dreamcatcher_web_endpoint_controller_show:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EndpointsApi->dreamcatcher_web_endpoint_controller_show: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Endpoint name |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Show endpoint response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]