Skip to main content

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.langchain 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.langchain 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.langchain 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.langchain import Embeddings

embeddings = Embeddings()
response = embeddings.embed_query('What is an ally?')
print(response)

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

Uploaded Source

Built Distribution

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

ally_ai-0.2.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ally_ai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1f528f288e7ace751674a3255dba2b9bfa086867a3568cdcd4525a46e469f212
MD5 7880bea7dac9b0146e29e98a6a6545b5
BLAKE2b-256 ba248bc6cb0265f61d27be04ff1412569932a8e7852861bc220aef7a818f532f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ally_ai-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.10

File hashes

Hashes for ally_ai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d09b841dae4049d5b146102cac211e28584d1d6c12fe55377ad9cebc3d6a0347
MD5 fc88fae99ab77c3ff5852a187dfbb12b
BLAKE2b-256 05b89f7ca1c8e5ee6ae0670869cf4750e438f08408f9099a668d647da8b703e1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.10

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.3

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page