Skip to main content

Aily Server 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


Download files

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

Source Distribution

aily_server_sdk-0.1.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

aily_server_sdk-0.1.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file aily_server_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: aily_server_sdk-0.1.1.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.5.0

File hashes

Hashes for aily_server_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 980d02c6625d8e60a80a902c34c52f48043ceeaa70a8d06bbb9d8321b9933228
MD5 2a3a90ba85700466ad4e1659e3661fbf
BLAKE2b-256 13b07f8556daa95cd032ae46b02eacaff89202b05b0da40be4113dcfbf1b08c6

See more details on using hashes here.

File details

Details for the file aily_server_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aily_server_sdk-0.1.1-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.5.0

File hashes

Hashes for aily_server_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 915ca101be86aa6c9ac1986bdd5deab20d91e80d48b1c7b7fb3ef4c4e7a0d74d
MD5 e5605cdf0499190357b27de7b39b4855
BLAKE2b-256 cd595e709b54e437a69392ebc5c724558b6aaaef21bc44f851f7f477ec9bb849

See more details on using hashes here.

Supported by

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