ally for your ai
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.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)
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f528f288e7ace751674a3255dba2b9bfa086867a3568cdcd4525a46e469f212
|
|
| MD5 |
7880bea7dac9b0146e29e98a6a6545b5
|
|
| BLAKE2b-256 |
ba248bc6cb0265f61d27be04ff1412569932a8e7852861bc220aef7a818f532f
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d09b841dae4049d5b146102cac211e28584d1d6c12fe55377ad9cebc3d6a0347
|
|
| MD5 |
fc88fae99ab77c3ff5852a187dfbb12b
|
|
| BLAKE2b-256 |
05b89f7ca1c8e5ee6ae0670869cf4750e438f08408f9099a668d647da8b703e1
|