Skip to main content

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

llama_index_llms_octoai-0.2.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

llama_index_llms_octoai-0.2.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_llms_octoai-0.2.0.tar.gz.

File metadata

  • Download URL: llama_index_llms_octoai-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0

File hashes

Hashes for llama_index_llms_octoai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4afabfea219319b3f2c8512912eb8914b8579ab8075d42b3359b9a2b2f941911
MD5 7632e76b32b9250d60ba97f3af4a641e
BLAKE2b-256 f41972f770f6dd3efdf36a4426063fc3e2e12a5a8b6e9a441ed16d4ce33067de

See more details on using hashes here.

File details

Details for the file llama_index_llms_octoai-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_llms_octoai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95353172d00810758df99cc1f3ec504ba678c0fb1ecd9a67462ad3a41907ffa4
MD5 523c18b9a759fd4c0a57eed9b8f5f82a
BLAKE2b-256 26595ac4a5cc37d2239eca6578693a75a5d727421e737e8369ac5f525a7dd6bf

See more details on using hashes here.

Supported by

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