Skip to content

devflowinc/trieve-py-client

Repository files navigation

trieve_py_client

Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.

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

  • API version: 0.8.2
  • Package version: 0.8.2
  • Generator version: 7.4.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://trieve.ai

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 trieve_py_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 trieve_py_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import trieve_py_client
from trieve_py_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.trieve.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = trieve_py_client.Configuration(
    host = "https://api.trieve.ai"
)



# Enter a context with an instance of the API client
with trieve_py_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = trieve_py_client.AuthApi(api_client)

    try:
        # OpenID Connect callback
        api_response = api_instance.callback()
        print("The response of AuthApi->callback:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AuthApi->callback: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.trieve.ai

Class Method HTTP request Description
AuthApi callback GET /api/auth/callback OpenID Connect callback
AuthApi get_me GET /api/auth/me Get Me
AuthApi login GET /api/auth Login
AuthApi logout DELETE /api/auth Logout
ChunkApi create_chunk POST /api/chunk Create or Upsert Chunk or Chunks
ChunkApi create_suggested_queries_handler POST /api/chunk/gen_suggestions Generate suggested queries
ChunkApi delete_chunk DELETE /api/chunk/{chunk_id} Delete Chunk
ChunkApi delete_chunk_by_tracking_id DELETE /api/chunk/tracking_id/{tracking_id} Delete Chunk By Tracking Id
ChunkApi generate_off_chunks POST /api/chunk/generate RAG on Specified Chunks
ChunkApi get_chunk_by_id GET /api/chunk/{chunk_id} Get Chunk By Id
ChunkApi get_chunk_by_tracking_id GET /api/chunk/tracking_id/{tracking_id} Get Chunk By Tracking Id
ChunkApi get_chunks_by_ids POST /api/chunks Get Chunks By Ids
ChunkApi get_chunks_by_tracking_ids POST /api/chunks/tracking Get Chunks By TrackingIds
ChunkApi get_recommended_chunks POST /api/chunk/recommend Get Recommended Chunks
ChunkApi search_chunks POST /api/chunk/search Search
ChunkApi update_chunk PUT /api/chunk Update Chunk
ChunkApi update_chunk_by_tracking_id PUT /api/chunk/tracking_id/update Update Chunk By Tracking Id
ChunkGroupApi add_chunk_to_group POST /api/chunk_group/chunk/{group_id} Add Chunk to Group
ChunkGroupApi add_chunk_to_group_by_tracking_id POST /api/chunk_group/tracking_id/{tracking_id} Add Chunk to Group by Tracking ID
ChunkGroupApi create_chunk_group POST /api/chunk_group Create Chunk Group
ChunkGroupApi delete_chunk_group DELETE /api/chunk_group/{group_id} Delete Group
ChunkGroupApi delete_group_by_tracking_id DELETE /api/chunk_group/tracking_id/{tracking_id} Delete Group by Tracking ID
ChunkGroupApi get_chunk_group GET /api/chunk_group/{group_id} Get Group
ChunkGroupApi get_chunks_in_group GET /api/chunk_group/{group_id}/{page} Get Chunks in Group
ChunkGroupApi get_chunks_in_group_by_tracking_id GET /api/chunk_group/tracking_id/{group_tracking_id}/{page} Get Chunks in Group by Tracking ID
ChunkGroupApi get_group_by_tracking_id GET /api/chunk_group/tracking_id/{tracking_id} Get Group by Tracking ID
ChunkGroupApi get_groups_chunk_is_in POST /api/chunk_group/chunks Get Groups for Chunks
ChunkGroupApi get_recommended_groups POST /api/chunk_group/recommend Get Recommended Groups
ChunkGroupApi get_specific_dataset_chunk_groups GET /api/dataset/groups/{dataset_id}/{page} Get Groups for Dataset
ChunkGroupApi remove_chunk_from_group DELETE /api/chunk_group/chunk/{group_id} Remove Chunk from Group
ChunkGroupApi search_over_groups POST /api/chunk_group/group_oriented_search Search Over Groups
ChunkGroupApi search_within_group POST /api/chunk_group/search Search Within Group
ChunkGroupApi update_chunk_group PUT /api/chunk_group Update Group
ChunkGroupApi update_group_by_tracking_id PUT /api/chunk_group/tracking_id/{tracking_id} Update Group by Tracking ID
DatasetApi create_dataset POST /api/dataset Create dataset
DatasetApi delete_dataset DELETE /api/dataset/{dataset_id} Delete Dataset
DatasetApi get_client_dataset_config GET /api/dataset/envs Get Client Configuration
DatasetApi get_dataset GET /api/dataset/{dataset_id} Get Dataset
DatasetApi get_datasets_from_organization GET /api/dataset/organization/{organization_id} Get Datasets from Organization
DatasetApi update_dataset PUT /api/dataset Update Dataset
EventsApi get_events POST /api/events Get events for the dataset
FileApi delete_file_handler DELETE /api/file/{file_id} Delete File
FileApi get_dataset_files_handler GET /api/dataset/files/{dataset_id}/{page} Get Files for Dataset
FileApi get_file_handler GET /api/file/{file_id} Get File
FileApi upload_file_handler POST /api/file Upload File
HealthApi health_check GET /api/health Health Check
InvitationApi post_invitation POST /api/invitation Send Invitation
MessageApi create_message_completion_handler POST /api/message Create a message
MessageApi edit_message_handler PUT /api/message Edit a message
MessageApi get_all_topic_messages GET /api/messages/{messages_topic_id} Get all messages for a given topic
MessageApi regenerate_message_handler DELETE /api/message Regenerate message
OrganizationApi create_organization POST /api/organization Create Organization
OrganizationApi delete_organization_by_id DELETE /api/organization/{organization_id} Delete Organization
OrganizationApi get_organization_by_id GET /api/organization/{organization_id} Get Organization
OrganizationApi get_organization_usage GET /api/organization/usage/{organization_id} Get Organization Usage
OrganizationApi get_organization_users GET /api/organization/users/{organization_id} Get Organization Users
OrganizationApi update_organization PUT /api/organization Update Organization
StripeApi cancel_subscription DELETE /api/stripe/subscription/{subscription_id} Cancel Subscription
StripeApi direct_to_payment_link GET /api/stripe/payment_link/{plan_id}/{organization_id} Checkout
StripeApi get_all_plans GET /api/stripe/plans Get All Plans
StripeApi update_subscription_plan PATCH /api/stripe/subscription_plan/{subscription_id}/{plan_id} Update Subscription Plan
TopicApi create_topic POST /api/topic Create Topic
TopicApi delete_topic DELETE /api/topic/{topic_id} Delete Topic
TopicApi get_all_topics_for_owner_id GET /api/topic/owner/{owner_id} Get All Topics for Owner ID
TopicApi update_topic PUT /api/topic Update Topic
UserApi delete_user_api_key DELETE /api/user/api_key/{api_key_id} Delete User Api Key
UserApi set_user_api_key POST /api/user/api_key Set User Api Key
UserApi update_user PUT /api/user Update User

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

ApiKey

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

Author

developers@trieve.ai

Releases

No releases published

Packages

No packages published