Skip to main content

llama-index llms alibabacloud_aisearch integration

Project description

LlamaIndex Llms Integration: Alibabacloud_Aisearch

Installation

pip install llama-index-llms-alibabacloud-aisearch

Usage

For further details, please visit text-generation-api-details.

You can specify the endpoint and aisearch_api_key in the constructor, or set the environment variables AISEARCH_ENDPOINT and AISEARCH_API_KEY.

from llama_index.llms.alibabacloud_aisearch import AlibabaCloudAISearchLLM
from llama_index.core import ChatPromptTemplate

llm = AlibabaCloudAISearchLLM(service_id="ops-qwen-turbo")
prompt_template = ChatPromptTemplate.from_messages(
    [("system", "You are helpful assistant."), ("user", "{prompt}")]
)
messages = prompt_template.format_messages(prompt="<your question>")
print(llm.chat(messages))

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

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_llms_alibabacloud_aisearch-0.4.0.tar.gz.

File metadata

  • Download URL: llama_index_llms_alibabacloud_aisearch-0.4.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_llms_alibabacloud_aisearch-0.4.0.tar.gz
Algorithm Hash digest
SHA256 164f86f108837acde12cb48af25dede6449a212052440e3c79a13918c6d07dac
MD5 afe6fe895de6267bdf5c0f3051450554
BLAKE2b-256 51ae8ebee64ab8ac37d8d2ccb5098a476697f1edf72dcb27507e58b8df37c613

See more details on using hashes here.

File details

Details for the file llama_index_llms_alibabacloud_aisearch-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_llms_alibabacloud_aisearch-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_llms_alibabacloud_aisearch-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 085336ce5ca438df103cc26a9161485c111d1cd1e7cea162865041c7cbcc9e7d
MD5 ea5bed1bbcf8e936055aff560caf699b
BLAKE2b-256 d3e3c51d1120819c0866f81ac73a15a8134632aa06a73c8fa13ceb7e065eebff

See more details on using hashes here.

Supported by

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