ABEJA OpsBeeLLM library is SDK for python, which allows developers to create, get and delete OpsBeeLLM resources.
Low level API directly accesses the API endpoints.
APIClient
APIClient
APIClient.add_chat_histories_to_dataset()
APIClient.add_qa_histories_to_dataset()
APIClient.create_chat_history()
APIClient.create_chat_history_metadata()
APIClient.create_qa_history()
APIClient.create_qa_history_metadata()
APIClient.create_tag()
APIClient.create_thread()
APIClient.delete_chat_history()
APIClient.delete_chat_history_metadata()
APIClient.delete_qa_history()
APIClient.delete_qa_history_metadata()
APIClient.delete_tag()
APIClient.delete_thread()
APIClient.get_chat_histories()
APIClient.get_chat_history()
APIClient.get_qa_histories()
APIClient.get_qa_history()
APIClient.get_tag()
APIClient.get_tags()
APIClient.get_thread()
APIClient.get_threads()
APIClient.update_chat_history()
APIClient.update_chat_history_metadata()
APIClient.update_qa_history()
APIClient.update_qa_history_metadata()
APIClient.update_tag()
APIClient.update_thread()
APIClient
from abeja.opsbeellm.history import APIClient as OpsBeeLLMHisotryAPIClient
credential = {"user_id": "user-1111111111111", "personal_access_token": "dummy"}
try:
resp_history = OpsBeeLLMHistoryAPIClient(credential=credential).create_qa_history(
organization_id="1111111111111", # [Required] オーガニゼーションIDを指定してください
deployment_id="2222222222222", # [Required] 作成したデプロイメントのIDを指定してください
input_text="ABEJAについて教えて", # [Required] LLM への入力文を入力してください
output_text="ABEJAは、スペイン語で「ミツバチ」の意味であり、植物の受粉を手伝い、世界の食料生産を支える存在として社名になっています。", # [Required] LLM からの応答文を入力してください
input_token_count=None, # [Optional] 必要に応じて、LLM への入力文のトークン数を指定してください。
output_token_count=None, # [Optional] 必要に応じて、LLM からの出力文のトークン数を指定してください。
tag_ids=[ # [Optional] 必要に応じて、入出力履歴に付与するためのタグのIDを List 型で設定してください。タグはあとからでも追加できます。
'3333333333333',
'4444444444444',
],
metadata=[ # [Optional] 必要に応じて、入出力ペア履歴に関連付けさせたい key-value 形式のメタデータを List[dict] 型で設定してください。メタデータはあとからでも設定できます
{"関連部署": "ABEJA全体"},
{"model_name": "gpt-3.5-turbo-0613"},
{"temperature": "0.0"},
],
)
print("resp_history: ", resp_history)
except Exception as e:
print(f'Faild to create qa history | {e}')
method |
path |
description |
---|---|---|
post |
/opsbee-llm/organizations/<organization_id>/deployments |
|
get |
/opsbee-llm/organizations/<organization_id>/deployments |
|
get |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id> |
|
delete |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id> |
|
patch |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id> |
method |
path |
description |
---|---|---|
post |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads |
|
get |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads |
|
get |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id> |
|
delete |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id> |
|
patch |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id> |
method |
path |
description |
---|---|---|
post |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/qa_histories |
|
get |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/qa_histories |
|
get |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/qa_histories/<history_id> |
|
delete |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/qa_histories/<history_id> |
|
patch |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/qa_histories/<history_id> |
|
post |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/qa_histories/dataset/<dataset_id>/items |
|
post |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id>/histories |
|
get |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id>/histories |
|
get |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id>/histories/<history_id> |
|
delete |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id>/histories/<history_id> |
|
patch |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id>/histories/<history_id> |
|
post |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/histories/dataset/<dataset_id>/items |
method |
path |
description |
---|---|---|
post |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/qa_histories/<history_id>/metadata |
|
delete |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/qa_histories/<history_id>/metadata |
|
patch |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/qa_histories/<history_id>/metadata |
|
post |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id>/histories/<history_id>/metadata |
|
delete |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id>/histories/<history_id>/metadata |
|
patch |
/opsbee-llm/organizations/<organization_id>/deployments/<deployment_id>/threads/<thread_id>/histories/<history_id>/metadata |
method |
path |
description |
---|---|---|
post |
/opsbee-llm/organizations/<organization_id>/datasets |
|
get |
/opsbee-llm/organizations/<organization_id>/datasets |
|
get |
/opsbee-llm/organizations/<organization_id>/datasets/<dataset_id> |
|
delete |
/opsbee-llm/organizations/<organization_id>/datasets/<dataset_id> |
|
patch |
/opsbee-llm/organizations/<organization_id>/datasets/<dataset_id> |
|
post |
/opsbee-llm/organizations/<organization_id>/datasets/<dataset_id>/items |
|
get |
/opsbee-llm/organizations/<organization_id>/datasets/<dataset_id>/items |
|
get |
/opsbee-llm/organizations/<organization_id>/datasets/<dataset_id>/items/<item_id> |
|
delete |
/opsbee-llm/organizations/<organization_id>/datasets/<dataset_id>/items/<item_id> |
|
patch |
/opsbee-llm/organizations/<organization_id>/datasets/<dataset_id>/items/<item_id> |
|