Name | llama-index-llms-alibabacloud-aisearch JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | llama-index llms alibabacloud_aisearch integration |
upload_time | 2024-09-09 23:09:24 |
maintainer | None |
docs_url | None |
author | llama-index |
requires_python | <4.0,>=3.8.1 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# LlamaIndex Llms Integration: Alibabacloud_Aisearch
## Installation
```
pip install llama-index-llms-alibabacloud-aisearch
```
## Usage
For further details, please visit `https://help.aliyun.com/zh/open-search/search-platform/developer-reference/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`.
```python
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))
```
Raw data
{
"_id": null,
"home_page": null,
"name": "llama-index-llms-alibabacloud-aisearch",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8.1",
"maintainer_email": null,
"keywords": null,
"author": "llama-index",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/b1/3d/20361e80439871e64bcc09c16a0356e1cc805b2f6b3f239dc5d9ff78c27c/llama_index_llms_alibabacloud_aisearch-0.1.0.tar.gz",
"platform": null,
"description": "# LlamaIndex Llms Integration: Alibabacloud_Aisearch\n\n## Installation\n\n```\npip install llama-index-llms-alibabacloud-aisearch\n```\n\n## Usage\n\nFor further details, please visit `https://help.aliyun.com/zh/open-search/search-platform/developer-reference/text-generation-api-details`\n\nYou can specify the `endpoint` and `aisearch_api_key` in the constructor, or set the environment variables `AISEARCH_ENDPOINT` and `AISEARCH_API_KEY`.\n\n```python\nfrom llama_index.llms.alibabacloud_aisearch import AlibabaCloudAISearchLLM\nfrom llama_index.core import ChatPromptTemplate\n\nllm = AlibabaCloudAISearchLLM(service_id=\"ops-qwen-turbo\")\nprompt_template = ChatPromptTemplate.from_messages(\n [(\"system\", \"You are helpful assistant.\"), (\"user\", \"{prompt}\")]\n)\nmessages = prompt_template.format_messages(prompt=\"<your question>\")\nprint(llm.chat(messages))\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "llama-index llms alibabacloud_aisearch integration",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "52ef5cc40969e42044fb5c1f667636052c290a04f9fbc617a1af160b539fe91e",
"md5": "0aa169830079bf1b4404d1a6c29cf811",
"sha256": "048a66081317f72f4487a57bc24a266f24ba472375be3b10249c993cbd57dfed"
},
"downloads": -1,
"filename": "llama_index_llms_alibabacloud_aisearch-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0aa169830079bf1b4404d1a6c29cf811",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8.1",
"size": 3941,
"upload_time": "2024-09-09T23:09:23",
"upload_time_iso_8601": "2024-09-09T23:09:23.183170Z",
"url": "https://files.pythonhosted.org/packages/52/ef/5cc40969e42044fb5c1f667636052c290a04f9fbc617a1af160b539fe91e/llama_index_llms_alibabacloud_aisearch-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b13d20361e80439871e64bcc09c16a0356e1cc805b2f6b3f239dc5d9ff78c27c",
"md5": "f9016e493e0b5e11e07ba1b1fbd85b5c",
"sha256": "9dd8f7bead3936923c6612b1e60fce0fd5986cf40bc8330e1c3560b435d476f9"
},
"downloads": -1,
"filename": "llama_index_llms_alibabacloud_aisearch-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "f9016e493e0b5e11e07ba1b1fbd85b5c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8.1",
"size": 3359,
"upload_time": "2024-09-09T23:09:24",
"upload_time_iso_8601": "2024-09-09T23:09:24.865932Z",
"url": "https://files.pythonhosted.org/packages/b1/3d/20361e80439871e64bcc09c16a0356e1cc805b2f6b3f239dc5d9ff78c27c/llama_index_llms_alibabacloud_aisearch-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-09 23:09:24",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-llms-alibabacloud-aisearch"
}