No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
This Python package is automatically generated by the Swagger Codegen project:
- API version: 0.1.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
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:
from taskingai import clientInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
from taskingai import clientPlease follow the installation procedure and then run the following:
from __future__ import print_function
import time
from taskingai import client
from taskingai.client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
body = client.AssistantCreateRequestBodySchema() # AssistantCreateRequestBodySchema |
try:
# Create assistant
api_response = api_instance.create_assistant(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->create_assistant: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
body = client.ChatCreateRequestBodySchema() # ChatCreateRequestBodySchema |
assistant_id = NULL # object |
try:
# Create chat
api_response = api_instance.create_chat(body, assistant_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->create_chat: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
assistant_id = NULL # object |
try:
# Delete assistant
api_response = api_instance.delete_assistant(assistant_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->delete_assistant: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
assistant_id = NULL # object |
chat_id = NULL # object |
try:
# Delete chat
api_response = api_instance.delete_chat(assistant_id, chat_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->delete_chat: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
body = client.ChatGenerateRequestBodySchema() # ChatGenerateRequestBodySchema |
assistant_id = NULL # object |
chat_id = NULL # object |
try:
# Generate
api_response = api_instance.generate(body, assistant_id, chat_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->generate: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
assistant_id = NULL # object |
try:
# Get assistant
api_response = api_instance.get_assistant(assistant_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->get_assistant: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
assistant_id = NULL # object |
chat_id = NULL # object |
try:
# Get chat
api_response = api_instance.get_chat(assistant_id, chat_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->get_chat: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
assistant_id = NULL # object |
chat_id = NULL # object |
message_id = NULL # object |
try:
# Get message
api_response = api_instance.get_message(assistant_id, chat_id, message_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->get_message: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
limit = 20 # object | (optional) (default to 20)
order = desc # object | (optional) (default to desc)
after = NULL # object | (optional)
before = NULL # object | (optional)
offset = NULL # object | (optional)
try:
# List assistants
api_response = api_instance.list_assistants(limit=limit, order=order, after=after, before=before, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->list_assistants: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
assistant_id = NULL # object |
try:
# List chats
api_response = api_instance.list_chats(assistant_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->list_chats: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
assistant_id = NULL # object |
chat_id = NULL # object |
limit = 20 # object | (optional) (default to 20)
order = desc # object | (optional) (default to desc)
after = NULL # object | (optional)
before = NULL # object | (optional)
try:
# List messages
api_response = api_instance.list_messages(assistant_id, chat_id, limit=limit, order=order, after=after,
before=before)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->list_messages: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
body = client.AssistantUpdateRequestBodySchema() # AssistantUpdateRequestBodySchema |
assistant_id = NULL # object |
try:
# Update assistant
api_response = api_instance.update_assistant(body, assistant_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->update_assistant: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
body = client.ChatUpdateRequestBodySchema() # ChatUpdateRequestBodySchema |
assistant_id = NULL # object |
chat_id = NULL # object |
try:
# Update chat
api_response = api_instance.update_chat(body, assistant_id, chat_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->update_chat: %s\n" % e)
# create an instance of the API class
api_instance = client.AsyncAssistantApi(client.SyncApiClient(configuration))
body = client.MessageUpdateRequestBodySchema() # MessageUpdateRequestBodySchema |
assistant_id = NULL # object |
chat_id = NULL # object |
message_id = NULL # object |
try:
# Update message
api_response = api_instance.update_message(body, assistant_id, chat_id, message_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AsyncAssistantApi->update_message: %s\n" % e)All URIs are relative to /
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AsyncAssistantApi | create_assistant | POST /api/v1/assistants | Create assistant |
| AsyncAssistantApi | create_chat | POST /api/v1/assistants/{assistant_id}/chats | Create chat |
| AsyncAssistantApi | delete_assistant | DELETE /api/v1/assistants/{assistant_id} | Delete assistant |
| AsyncAssistantApi | delete_chat | DELETE /api/v1/assistants/{assistant_id}/chats/{chat_id} | Delete chat |
| AsyncAssistantApi | generate | POST /api/v1/assistants/{assistant_id}/chats/{chat_id}/generate | Generate |
| AsyncAssistantApi | get_assistant | GET /api/v1/assistants/{assistant_id} | Get assistant |
| AsyncAssistantApi | get_chat | GET /api/v1/assistants/{assistant_id}/chats/{chat_id} | Get chat |
| AsyncAssistantApi | get_message | GET /api/v1/assistants/{assistant_id}/chats/{chat_id}/messages/{message_id} | Get message |
| AsyncAssistantApi | list_assistants | GET /api/v1/assistants | List assistants |
| AsyncAssistantApi | list_chats | GET /api/v1/assistants/{assistant_id}/chats | List chats |
| AsyncAssistantApi | list_messages | GET /api/v1/assistants/{assistant_id}/chats/{chat_id}/messages | List messages |
| AsyncAssistantApi | update_assistant | POST /api/v1/assistants/{assistant_id} | Update assistant |
| AsyncAssistantApi | update_chat | POST /api/v1/assistants/{assistant_id}/chats/{chat_id} | Update chat |
| AsyncAssistantApi | update_message | POST /api/v1/assistants/{assistant_id}/chats/{chat_id}/messages/{message_id} | Update message |
| RetrievalApi | create_collection | POST /api/v1/collections | Create collection |
| RetrievalApi | create_record | POST /api/v1/collections/{collection_id}/records | Create record |
| RetrievalApi | delete_collection | DELETE /api/v1/collections/{collection_id} | Delete collection |
| RetrievalApi | delete_record | DELETE /api/v1/collections/{collection_id}/records/{record_id} | Delete record |
| RetrievalApi | get_collection | GET /api/v1/collections/{collection_id} | Get collection |
| RetrievalApi | get_record | GET /api/v1/collections/{collection_id}/records/{record_id} | Get record |
| RetrievalApi | list_collections | GET /api/v1/collections | List collections |
| RetrievalApi | list_records | GET /api/v1/collections/{collection_id}/records | List records |
| RetrievalApi | query_chunks | POST /api/v1/collections/{collection_id}/chunks/params | Query chunks |
| RetrievalApi | update_collection | POST /api/v1/collections/{collection_id} | Update collection |
| RetrievalApi | update_record | POST /api/v1/collections/{collection_id}/records/{record_id} | Update record |
- Assistant
- AssistantCreateRequestBodySchema
- AssistantCreateResponseSchema
- AssistantGetResponseSchema
- AssistantListResponseSchema
- AssistantUpdateRequestBodySchema
- AssistantUpdateResponseSchema
- BaseSuccessEmptyOutSchema
- Chat
- ChatCreateRequestBodySchema
- ChatCreateResponseSchema
- ChatGenerateRequestBodySchema
- ChatGenerateResponseSchema
- ChatGenerateUserMessage
- ChatGetResponseSchema
- ChatListResponseSchema
- ChatUpdateRequestBodySchema
- ChatUpdateResponseSchema
- Chunk
- ChunkQueryRequestBodySchema
- ChunkQueryResponseSchema
- Collection
- CollectionCreateRequestBodySchema
- CollectionCreateResponseSchema
- CollectionGetResponseSchema
- CollectionListResponseSchema
- CollectionUpdateRequestBodySchema
- CollectionUpdateResponseSchema
- HTTPValidationError
- Message
- MessageContent
- MessageGetResponseSchema
- MessageListResponseSchema
- MessageUpdateRequestBodySchema
- MessageUpdateResponseSchema
- Record
- RecordCreateRequestBodySchema
- RecordCreateResponseSchema
- RecordGetResponseSchema
- RecordListResponseSchema
- RecordUpdateRequestBodySchema
- RecordUpdateResponseSchema
- ValidationError
All endpoints do not require authorization.