llama-index llms octoai integration
Project description
LlamaIndex Llms Integration: OctoAI
Using the OctoAI LLMs Integration is a simple as:
from llama_index.llms.octoai import OctoAI
octoai = OctoAI(token=OCTOAI_API_KEY)
response = octoai.complete("Paul Graham is ")
print(response)
Calling chat
with a list of messages
from llama_index.core.llms import ChatMessage
messages = [
ChatMessage(
role="system",
content="Below is an instruction that describes a task. Write a response that appropriately completes the request.",
),
ChatMessage(role="user", content="Write a blog about Seattle"),
]
response = octoai.chat(messages)
print(response)
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
File details
Details for the file llama_index_llms_octoai-0.4.0.tar.gz
.
File metadata
- Download URL: llama_index_llms_octoai-0.4.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4521d8df783575de959c168cf08c1a4275a634ac72c3a62de737983fc583f0f |
|
MD5 | 1c9596d1ecc4400c0cb51ebab8ad4a1e |
|
BLAKE2b-256 | 509563d30f3dd89d38463e83a94b82de3eb742d0bbef18e389b8d1d429e220d1 |
File details
Details for the file llama_index_llms_octoai-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_llms_octoai-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb462716fd8e8db67e0428e885467c3080d05e6c103d69ee9300978e0508a61c |
|
MD5 | 8ad05b509babe76e881fea26ea75b430 |
|
BLAKE2b-256 | 8910680b0444728c18269eb6a9959bc272cdbd3da189f1ce8772c6a0ca4e5048 |