Skip to main content

llamaindex azure openai package for ally

Project description

Ally AI

How to use

Config File

llm:
  api_key: '<private-key>'
  api_version: "<api-version>"
  endpoint: "<endpoint>"
  model: "<model-name>"
  deployment_name: '<deployment-name>'
  temperature: 0.7
  streaming: true

embeddings:
  api_key: '<private-key>'
  api_version: "<api-version>"
  endpoint: "<endpoint>"
  model: "<model-name>"
  deployment_name: '<deployment-name>'

Create LLM

Use Default Settings in LLM

from ally_ai.llamaindex import LLM

llm = LLM()
response = llm.invoke('What is an ally?')
print(response)

Use Custom Settings in LLM

my_llm:
  api_key: '<private-key>'
  api_version: "<api-version>"
from ally_ai.llamaindex import LLM, Settings

settings = Settings(section='my_llm')
llm = LLM(settings=settings)
print(llm.settings.path)
print(llm.settings.section)

Override Settings in LLM

from ally_ai.llamaindex import LLM, Settings

settings = Settings(section='my_llm', api_key='<new-api-key>')
llm = LLM(settings=settings)
response = llm.invoke('What is an ally?')
print(response)

How to Create Embeddings

from ally_ai.llamaindex import Embeddings

embeddings = Embeddings()
response = embeddings.embed_query('What is an ally?')
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

ally_ai_llamaindex-0.0.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

ally_ai_llamaindex-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file ally_ai_llamaindex-0.0.1.tar.gz.

File metadata

  • Download URL: ally_ai_llamaindex-0.0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.10

File hashes

Hashes for ally_ai_llamaindex-0.0.1.tar.gz
Algorithm Hash digest
SHA256 89b1e288a61051a7c577151314237ac8a0f820cff4577e0528ee3653c731c4e6
MD5 6f8aa7b36ef42408321e31b0282bddd1
BLAKE2b-256 a775b32ba595edcfc76648dae04d7717bc41f582247bef3cb0a52e4d7a3a194d

See more details on using hashes here.

File details

Details for the file ally_ai_llamaindex-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ally_ai_llamaindex-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b780adaf3b70c85c0df0f7e873db06d85bf714661841d2215c1da97b28b02a0f
MD5 91c5bbc0ae1e4a0d25c4a63570cd6f4e
BLAKE2b-256 d1840b6b89d2f5b989e477da89f885e99aaae5cc60533526d901534bc714fb35

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