Aily Code SDK
Project description
Aily Code SDK
调用LLM
from aily.server_sdk import llm
message = llm.generate(messages=[
{"role": "user", "content": "Hello world"}
], model="BYOM-pro")
print(message.content)
message = llm.generate(messages=[
{"role": "user", "content": "Hello world"}
], model=llm.LLMModel.BYOM_PRO)
print(message.content)
发送消息
from aily.server_sdk.conversation import send_message, update_message
message_id = send_message('xxx')
print(message_id)
数据查询
执行OQL
from aily.server_sdk.data import execute_oql
oql_query = "SELECT * FROM data_table"
oql_results = execute_oql(oql_query)
print(f"OQL查询结果: {oql_results}")
from aily.server_sdk.data import execute_sql
# 执行SQL查询
sql_query = "SELECT * FROM analytics_table"
sql_results = execute_sql(sql_query)
print(f"SQL查询结果: {sql_results}")
知识库查询
from aily.server_sdk import knowledge
knowledge_id = "my_knowledge_base"
query_text = "如何获取飞书多维表格的高阶权限协作者?"
results = knowledge.retrieve(knowledge_id, query_text, top_k=3, threshold=0.7)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aily_code_sdk-0.1.0b4.tar.gz
(9.4 kB
view details)
Built Distribution
File details
Details for the file aily_code_sdk-0.1.0b4.tar.gz
.
File metadata
- Download URL: aily_code_sdk-0.1.0b4.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.1 Darwin/23.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1010ab2d28378a257ffe4f26d2a4bf671eb326769bf06c3f756e3b4ec84523b0 |
|
MD5 | 8b04892671d6a9b17f95e2116b61293b |
|
BLAKE2b-256 | 77ed74e95fd9611cd9ac4e405cc841f6b25e8a57ee757a85443759245fc3a18e |
File details
Details for the file aily_code_sdk-0.1.0b4-py3-none-any.whl
.
File metadata
- Download URL: aily_code_sdk-0.1.0b4-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.1 Darwin/23.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4efd39d391d6ac2cabb384f0c471713a7d303bc63f6007964c4d95cbef4876f7 |
|
MD5 | bb401a2d20c2134f3af4574c5f4c88c9 |
|
BLAKE2b-256 | 2bff1540b17d45cb47616d78574aaa953a56454135a7f1351b7563ef8dcc81a1 |