NikitolProject 4f1fcde0ce
Some checks failed
openapi_client Python package / build (3.11) (push) Failing after 46s
openapi_client Python package / build (3.10) (push) Failing after 48s
openapi_client Python package / build (3.7) (push) Failing after 5s
openapi_client Python package / build (3.8) (push) Failing after 5s
openapi_client Python package / build (3.9) (push) Failing after 5s
Add description field to prompt blocks
2024-09-01 13:28:42 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00
2024-08-27 18:43:29 +03:00

openapi-client

This API gives you the ability to interact with AISF's neural networks

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

  • API version: 1.0
  • Package version: 1.0.0
  • Generator version: 7.8.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

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 ai_core_api_client

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 ai_core_api_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:


import ai_core_api_client
from ai_core_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = ai_core_api_client.Configuration(
    host = "/api/v1"
)

# 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 API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with ai_core_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ai_core_api_client.AiApi(api_client)
    request = ai_core_api_client.DomainConversationRequest() # DomainConversationRequest | Conversation Request

    try:
        # Generate response from AI model
        api_response = api_instance.conversation_post(request)
        print("The response of AiApi->conversation_post:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AiApi->conversation_post: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to /api/v1

Class Method HTTP request Description
AiApi conversation_post POST /conversation Generate response from AI model
ChatsApi chats_get GET /chats Get all client chats of company
CompanyApi company_get GET /company Returns a list of companies
CompanyApi company_id_delete DELETE /company/{id} Delete company from the database
CompanyApi company_id_get GET /company/{id} Get company details
CompanyApi company_patch PATCH /company Update a company in the database
CompanyApi company_post POST /company Adds a company to the database
GetMeApi get_me_get GET /get-me Get company details
MetricsApi metrics_get GET /metrics Get company metrics

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

Description
Python OpenAPI client for ai-core-api
Readme 88 KiB
Languages
Python 99.3%
Shell 0.7%