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
Built Distribution
File details
Details for the file ally_ai_llamaindex-0.0.3.tar.gz
.
File metadata
- Download URL: ally_ai_llamaindex-0.0.3.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f97a2a801d4538f8b797ff228391998b0eabf65aa0fb994fcaec91314685ead |
|
MD5 | a6bacc9db14998ae8bc8d17b0ab13511 |
|
BLAKE2b-256 | 97d634fee185f428a18e1f75371d88ccbecc98c39b25119e361d7e58f73bf073 |
File details
Details for the file ally_ai_llamaindex-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: ally_ai_llamaindex-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.8 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 | 9d841ede0ecd9815c6efaef5650d3d3fefc97cb63c8191069cdaaddc104b93dc |
|
MD5 | 1af431789ca46a3bedd1580cb150fb93 |
|
BLAKE2b-256 | 13cb2f06d84cb5665e70b61780c2c1812d9cb1120ca5cf9df3095f5d5d95e71e |