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.3.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_llms_alibabacloud_aisearch-0.3.1.tar.gz
Algorithm Hash digest
SHA256 96ea279f32421ab83fa023868f1440edf3dd9275ebaa545572d86e34dfbf0e4a
MD5 407d753299fcfda5d202ec500b211fe7
BLAKE2b-256 b98104a44b6dbdde51251578a3419045d8eb9edd74fcfe16d0b31bff600969f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_alibabacloud_aisearch-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8094b5fa3ddd777f70add37f162bcee2d456398e79f768f051a87ce9b91589c7
MD5 459230cd911a95a1b499bf950b7a89f6
BLAKE2b-256 8b45a4c7fe07120658ea3a35918e7583ae269f9f5ce0ee8f1d606df429643df3

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