Skip to main content

OpenAPI-generated Python client for OGX (alternative SDK with OpenAPI Generator tooling)

Project description

ogx-open-client

This is the specification of the OGX that provides a set of endpoints and their corresponding interfaces that are tailored to best leverage Llama Models.

**🔗 COMBINED**: This specification includes both stable production-ready APIs
and experimental pre-release APIs. Use stable APIs for production deployments
and experimental APIs for testing new features.

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

  • API version: v1
  • Package version: 1.0.3.dev0
  • Generator version: 7.19.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

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 ogx_open_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 ogx_open_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import ogx_open_client
from ogx_open_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://any-hosted-ogx.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ogx_open_client.Configuration(
    host = "http://any-hosted-ogx.com"
)



# Enter a context with an instance of the API client
with ogx_open_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ogx_open_client.AdminApi(api_client)
    provider_id = 'provider_id_example' # str | The ID of the provider to inspect.

    try:
        # Get provider details
        api_response = api_instance.inspect_provider(provider_id)
        print("The response of AdminApi->inspect_provider:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AdminApi->inspect_provider: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://any-hosted-ogx.com

Class Method HTTP request Description
AdminApi inspect_provider GET /v1alpha/admin/providers/{provider_id} Get provider details
AdminApi list_providers GET /v1alpha/admin/providers List all available providers
AdminApi list_routes GET /v1alpha/admin/inspect/routes List all available API routes
AdminApi health GET /v1alpha/admin/health Get service health status
AdminApi version GET /v1alpha/admin/version Get service version
AlphaApi dummy GET /dummy/alpha Placeholder for alpha resource group
BatchesApi cancel POST /v1/batches/{batch_id}/cancel Cancel a batch that is in progress.
BatchesApi retrieve GET /v1/batches/{batch_id} Retrieve information about a specific batch.
BatchesApi create POST /v1/batches Create a new batch for processing multiple API requests.
BatchesApi list GET /v1/batches List all batches for the current user.
ChatApi dummy GET /dummy/chat Placeholder for chat resource group
ChatCompletionsApi retrieve GET /v1/chat/completions/{completion_id} Get chat completion.
ChatCompletionsApi create POST /v1/chat/completions Create chat completions.
ChatCompletionsApi list GET /v1/chat/completions List chat completions.
CompletionsApi create POST /v1/completions Create completion.
ConnectorsApi connector_tool_v1alpha_admin_connectors_connector_id_tools_tool_name_get GET /v1alpha/admin/connectors/{connector_id}/tools/{tool_name} Get a tool by name from a connector.
ConnectorsApi connector_tools_v1alpha_admin_connectors_connector_id_tools_get GET /v1alpha/admin/connectors/{connector_id}/tools List tools from a connector.
ConnectorsApi connector_v1alpha_admin_connectors_connector_id_get GET /v1alpha/admin/connectors/{connector_id} Get a connector by its ID.
ConnectorsApi connectors_v1alpha_admin_connectors_get GET /v1alpha/admin/connectors List all connectors.
ConversationsApi delete DELETE /v1/conversations/{conversation_id} Delete a conversation.
ConversationsApi retrieve GET /v1/conversations/{conversation_id} Retrieve a conversation.
ConversationsApi update POST /v1/conversations/{conversation_id} Update a conversation.
ConversationsApi create POST /v1/conversations Create a conversation.
EmbeddingsApi create POST /v1/embeddings Create embeddings.
FileBatchesApi cancel POST /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel Cancel a vector store file batch (OpenAI-compatible).
FileBatchesApi create POST /v1/vector_stores/{vector_store_id}/file_batches Create a vector store file batch (OpenAI-compatible).
FileBatchesApi list_files GET /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files List files in a vector store file batch (OpenAI-compatible).
FileBatchesApi retrieve GET /v1/vector_stores/{vector_store_id}/file_batches/{batch_id} Retrieve a vector store file batch (OpenAI-compatible).
FileProcessorsApi file_v1alpha_file_processors_process_post POST /v1alpha/file-processors/process Process a file into chunks ready for vector database storage.
FilesApi content GET /v1/files/{file_id}/content Retrieve file content
FilesApi delete DELETE /v1/files/{file_id} Delete file
FilesApi retrieve GET /v1/files/{file_id} Get file
FilesApi create POST /v1/files Upload file
FilesApi list GET /v1/files List files
InferenceApi rerank POST /v1alpha/inference/rerank Rerank documents based on relevance to a query.
InputItemsApi list GET /v1/responses/{response_id}/input_items List input items.
InspectApi health GET /v1/health Get health status.
InspectApi version GET /v1/version Get version.
InteractionsApi interaction_v1alpha_interactions_post POST /v1alpha/interactions Create an interaction.
ItemsApi delete DELETE /v1/conversations/{conversation_id}/items/{item_id} Delete an item.
ItemsApi get GET /v1/conversations/{conversation_id}/items/{item_id} Retrieve an item.
ItemsApi list GET /v1/conversations/{conversation_id}/items List items.
ItemsApi create POST /v1/conversations/{conversation_id}/items Create items.
MessagesApi list GET /v1/chat/completions/{completion_id}/messages List chat completion messages.
MessagesApi message_batch_results_v1_messages_batches_message_batch_id_results_get GET /v1/messages/batches/{message_batch_id}/results Retrieve Message Batch results.
MessagesApi message_batch_v1_messages_batches_message_batch_id_cancel_post POST /v1/messages/batches/{message_batch_id}/cancel Cancel a Message Batch.
MessagesApi message_batch_v1_messages_batches_message_batch_id_get GET /v1/messages/batches/{message_batch_id} Retrieve a Message Batch.
MessagesApi message_batch_v1_messages_batches_post POST /v1/messages/batches Create a Message Batch.
MessagesApi message_batches_v1_messages_batches_get GET /v1/messages/batches List Message Batches.
MessagesApi message_tokens_v1_messages_count_tokens_post POST /v1/messages/count_tokens Count tokens in a message.
MessagesApi message_v1_messages_post POST /v1/messages Create a message.
ModelsApi retrieve GET /v1/models/{model_id} Get a model by its identifier.
OpenaiApi list GET /v1/models List models.
PromptsApi set_default_version PUT /v1/prompts/{prompt_id}/set-default-version Set prompt version.
PromptsApi create POST /v1/prompts Create a prompt.
PromptsApi delete DELETE /v1/prompts/{prompt_id} Delete a prompt.
PromptsApi retrieve GET /v1/prompts/{prompt_id} Get a prompt.
PromptsApi update PUT /v1/prompts/{prompt_id} Update a prompt.
PromptsApi list GET /v1/prompts List all prompts.
ProvidersApi retrieve GET /v1/providers/{provider_id} Get provider.
ProvidersApi list GET /v1/providers List providers.
ResponsesApi compact POST /v1/responses/compact Compact a conversation. [alpha]
ResponsesApi create POST /v1/responses Create a model response.
ResponsesApi openai_response_v1_responses_response_id_cancel_post POST /v1/responses/{response_id}/cancel Cancel a background response that is in progress.
ResponsesApi delete DELETE /v1/responses/{response_id} Delete a response.
ResponsesApi retrieve GET /v1/responses/{response_id} Get a model response.
ResponsesApi list GET /v1/responses List all responses.
RoutesApi list GET /v1/inspect/routes List routes.
ToolsApi tools_v1_admin_tools_get GET /v1/admin/tools List tools with optional tool group filter.
VectorIoApi insert POST /v1/vector-io/insert Insert embedded chunks into a vector database.
VectorIoApi query POST /v1/vector-io/query Query chunks from a vector database.
VectorStoresApi create POST /v1/vector_stores Create a vector store (OpenAI-compatible).
VectorStoresApi delete DELETE /v1/vector_stores/{vector_store_id} Delete a vector store (OpenAI-compatible).
VectorStoresApi list GET /v1/vector_stores List vector stores (OpenAI-compatible).
VectorStoresApi retrieve GET /v1/vector_stores/{vector_store_id} Retrieve a vector store (OpenAI-compatible).
VectorStoresApi search POST /v1/vector_stores/{vector_store_id}/search Search a vector store (OpenAI-compatible).
VectorStoresApi update POST /v1/vector_stores/{vector_store_id} Update a vector store (OpenAI-compatible).
VectorStoresFilesApi create POST /v1/vector_stores/{vector_store_id}/files Attach a file to a vector store (OpenAI-compatible).
VectorStoresFilesApi delete DELETE /v1/vector_stores/{vector_store_id}/files/{file_id} Delete a vector store file (OpenAI-compatible).
VectorStoresFilesApi list GET /v1/vector_stores/{vector_store_id}/files List files in a vector store (OpenAI-compatible).
VectorStoresFilesApi content GET /v1/vector_stores/{vector_store_id}/files/{file_id}/content Retrieve vector store file contents (OpenAI-compatible).
VectorStoresFilesApi retrieve GET /v1/vector_stores/{vector_store_id}/files/{file_id} Retrieve a vector store file (OpenAI-compatible).
VectorStoresFilesApi update POST /v1/vector_stores/{vector_store_id}/files/{file_id} Update a vector store file (OpenAI-compatible).
VersionsApi list GET /v1/prompts/{prompt_id}/versions List prompt versions.

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ogx_open_client-1.0.3.dev4.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ogx_open_client-1.0.3.dev4-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

Details for the file ogx_open_client-1.0.3.dev4.tar.gz.

File metadata

  • Download URL: ogx_open_client-1.0.3.dev4.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ogx_open_client-1.0.3.dev4.tar.gz
Algorithm Hash digest
SHA256 c1c0dbc01d9f2481f3b99d32a4c42abb04b7b659fbcd34b0047074148c827663
MD5 885bbe3d2d4e972a83ab475072fe5fb3
BLAKE2b-256 fc8bce776544ec589ec12f75d55c7b4a17bed5d780a61e6aa69bc6d27fba30ca

See more details on using hashes here.

File details

Details for the file ogx_open_client-1.0.3.dev4-py3-none-any.whl.

File metadata

  • Download URL: ogx_open_client-1.0.3.dev4-py3-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ogx_open_client-1.0.3.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 e6a33ca5a5a83890a583a7e4b98f202a0d7928fccbcff8ee764796cb39649126
MD5 f62d9890eee64611b357dfcbe13bc114
BLAKE2b-256 a14f4d728dc63620449dd3db6e70f7a0c335bef25be6980cb98558d8d45a480a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page