Skip to main content

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))

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

File metadata

  • Download URL: llama_index_llms_alibabacloud_aisearch-0.5.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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.5.0.tar.gz
Algorithm Hash digest
SHA256 6718f547cf82fd2ad2287b0f10079795a5698dfb44be7ef037d134a340f81921
MD5 aa13d1af70516b566ae2f0620d3efd45
BLAKE2b-256 7aa084219f9493cbb012d82cb89f508a4ea8193c649daad4e5fed6b47760f80d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_index_llms_alibabacloud_aisearch-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8e1656496d2b389669065a1000abebe7d21847e02d78d1688af80bf8dfb79d1
MD5 74aa30f7a647b143c9c377816d0dae38
BLAKE2b-256 76bb178973699fa53434efdc42ea996b12053e2e2159482c6970f22de459efc4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page