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 EmbeddingModel

model = EmbeddingModel()
response = model.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_langchain-0.5.0.tar.gz (3.0 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_langchain-0.5.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file ally_ai_langchain-0.5.0.tar.gz.

File metadata

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

File hashes

Hashes for ally_ai_langchain-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1448a5b4af2cc51e41a322eaa05e2261269a6d99dd56698075cf2d7a4dda6ed4
MD5 43033006dc6e5072513a02357c43f377
BLAKE2b-256 1ebf248037ee3c13d8cac1bb1940bbb8b9cd2326ab4d0d391b3e7f26c94ff058

See more details on using hashes here.

File details

Details for the file ally_ai_langchain-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ally_ai_langchain-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03a904ef2dbedc3d613b113f61f7c2044f8f79e0b2b5cbfdaf17d6d5c85dfd4a
MD5 d4ef27187496a6176d053c8ef4eced0b
BLAKE2b-256 c23edca2cd52c37e0f64329221cde248a2807b122c2b7ee820e3d9f7c60c84a7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

0.0.2

2 files

0.0.1

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