Skip to content

fmops/dreamcatcher-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dreamcatcher-api

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This Python package is automatically generated by the OpenAPI Generator project:

  • API version:
  • Package version: 0.0.1
  • Generator version: 7.7.0
  • Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import dreamcatcher

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import dreamcatcher

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
import dreamcatcher
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.DlpPoliciesApi(api_client)
    endpoint_name = 'demo-endpoint' # str | Endpoint name
    dlp_policy_params = dreamcatcher.DlpPolicyParams() # DlpPolicyParams | DLP policy params (optional)

    try:
        # Create a DLP policy
        api_response = api_instance.dreamcatcher_web_presidio_policy_controller_create(endpoint_name, dlp_policy_params=dlp_policy_params)
        print("The response of DlpPoliciesApi->dreamcatcher_web_presidio_policy_controller_create:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DlpPoliciesApi->dreamcatcher_web_presidio_policy_controller_create: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:4000

Class Method HTTP request Description
DlpPoliciesApi dreamcatcher_web_presidio_policy_controller_create POST /api/v1/endpoints/{endpoint_name}/policies/dlp Create a DLP policy
DlpPoliciesApi dreamcatcher_web_presidio_policy_controller_delete DELETE /api/v1/endpoints/{endpoint_name}/policies/dlp/{id} Delete a DLP policy
DlpPoliciesApi dreamcatcher_web_presidio_policy_controller_scan POST /api/v1/endpoints/{endpoint_name}/policies/dlp/{id}/scan Scan content with a DLP policy
DlpPoliciesApi dreamcatcher_web_presidio_policy_controller_show GET /api/v1/endpoints/{endpoint_name}/policies/dlp/{id} Get a DLP policy
DlpPoliciesApi dreamcatcher_web_presidio_policy_controller_update PATCH /api/v1/endpoints/{endpoint_name}/policies/dlp/{id} Update a DLP policy
DlpPoliciesApi dreamcatcher_web_presidio_policy_controller_update__2 PUT /api/v1/endpoints/{endpoint_name}/policies/dlp/{id} Update a DLP policy
DlpZsnerPoliciesApi dreamcatcher_web_zero_shot_ner_policy_controller_create POST /api/v1/endpoints/{endpoint_name}/policies/dlp_zsner Create a DLP ZSNER policy
DlpZsnerPoliciesApi dreamcatcher_web_zero_shot_ner_policy_controller_delete DELETE /api/v1/endpoints/{endpoint_name}/policies/dlp_zsner/{id} Delete a DLP ZSNER policy
DlpZsnerPoliciesApi dreamcatcher_web_zero_shot_ner_policy_controller_scan POST /api/v1/endpoints/{endpoint_name}/policies/dlp_zsner/{id}/scan Scan content with a DLP ZSNER policy
DlpZsnerPoliciesApi dreamcatcher_web_zero_shot_ner_policy_controller_show GET /api/v1/endpoints/{endpoint_name}/policies/dlp_zsner/{id} Get a DLP ZSNER policy
DlpZsnerPoliciesApi dreamcatcher_web_zero_shot_ner_policy_controller_update PATCH /api/v1/endpoints/{endpoint_name}/policies/dlp_zsner/{id} Update a DLP ZSNER policy
DlpZsnerPoliciesApi dreamcatcher_web_zero_shot_ner_policy_controller_update__2 PUT /api/v1/endpoints/{endpoint_name}/policies/dlp_zsner/{id} Update a DLP ZSNER policy
EndpointsApi dreamcatcher_web_endpoint_controller_index GET /api/v1/endpoints List endpoints
EndpointsApi dreamcatcher_web_endpoint_controller_invoke_chat_completions POST /api/v1/endpoints/{endpoint_name}/openai/v1/chat/completions Invoke a chat completion
EndpointsApi dreamcatcher_web_endpoint_controller_invoke_completions POST /api/v1/endpoints/{endpoint_name}/openai/v1/completions Invoke a completion
EndpointsApi dreamcatcher_web_endpoint_controller_models GET /api/v1/endpoints/{endpoint_name}/openai/v1/models Lists upstreams (ie models) for an endpoint
EndpointsApi dreamcatcher_web_endpoint_controller_show GET /api/v1/endpoints/{id} Get an endpoint
StubOpenaiApi stubidity_open_ai_chat_completion_call POST /api/v1/stub/openai/v1/chat/completions Chat completion
StubOpenaiApi stubidity_open_ai_completion_call POST /api/v1/stub/openai/v1/completions Completion
StubOpenaiApi stubidity_open_ai_embedding_call POST /api/v1/stub/openai/v1/embeddings Embedding
StubOpenaiApi stubidity_open_ai_embedding_call__2 POST /api/v1/stub/openai/v1/engines/{model} Embedding

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

authorization

  • Type: Bearer authentication

Author

About

Python SDK for dreamcatcher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages