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.5.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_llms_octoai-0.5.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_llms_octoai-0.5.1.tar.gz
Algorithm Hash digest
SHA256 d9c0a712079224eee7e44c56d7110dcca6439d6dcece53e937c742ac9d7756d0
MD5 c7817c586745f3e982e2cc69a14dc55f
BLAKE2b-256 778524c1b39692d0123383db39a4724fa88e36b3c878d4ea99be8b63f877a6c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_octoai-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b6ab3d80a548b4bd9ad742fe0dbdb614be2af0cecb43d10054ca45e6b479726
MD5 8fc945ef2ffff2ace0d54e6ad9b1b94d
BLAKE2b-256 2c90a91994350d25055d78abf4bc1a5bb88ab8edcfafc16a6d050c4369e00d23

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