Skip to main content

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


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.0b7.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

aily_code_sdk-0.1.0b7-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file aily_code_sdk-0.1.0b7.tar.gz.

File metadata

  • Download URL: aily_code_sdk-0.1.0b7.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.1 Darwin/23.2.0

File hashes

Hashes for aily_code_sdk-0.1.0b7.tar.gz
Algorithm Hash digest
SHA256 f34760f8a0fa9e05cfa85e99eb04a2491fed822f40a69bbc1d8868617391bfe6
MD5 50603c8e70638ab3b5a34b9b661f6c17
BLAKE2b-256 7f6ece4361b036b12291b4831476a774ecdce67a9f46340dd01b4a2b10668bd5

See more details on using hashes here.

File details

Details for the file aily_code_sdk-0.1.0b7-py3-none-any.whl.

File metadata

  • Download URL: aily_code_sdk-0.1.0b7-py3-none-any.whl
  • Upload date:
  • Size: 11.3 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

Hashes for aily_code_sdk-0.1.0b7-py3-none-any.whl
Algorithm Hash digest
SHA256 976bb7ed8afb783b18750a58a1c0de112899f6ad0eebece062c83d1e04e2da9d
MD5 c854d0fefbddd760f0db0720bcdd116f
BLAKE2b-256 ca877c12586eeb8bd0a1b7f291674b17b1a84dfb56e5e80bad2cd8a581aa4885

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