Assistants
Developing language assistants with LLMs in a low-code way.
Quick Install
Install using pip:
pip install langassist
The framework requires a database to register the assistants. The default database used is MongoAtlas. Future versions of the framework will support additional database types. Currently, there is a MongoDB collection named assistants which registers each assistant as shown below:
_id : 6556db6cf114addad09420c6
assistant_name: "test_assist"
assistant_id: "asst_52TLl1OdJW6ulmLCEsDlizz8"
file_id: "file-lZUBJ3ZnxtkTfqsuE0WYMXDI"
What are Assistants?
Assistants is a framework for developing language-based assistants using micro agents, akin to the microservices concept. Each micro agent, like a microservice, can be independently developed and deployed. The framework adheres to the Single Responsibility Principle (SRP), allowing these assistants to be combined to address complex business processes through workflows.
Capabilities of the Framework
In time, the framework will include built-in assistants for immediate deployment within OpenAI environments. It will also support the development of custom assistants.
Contribution
Contributions are welcome in any form, be it through new features or improved documentation.
Example Usage
The repository includes various examples demonstrating framework usage.
# This is an example that shows how to use and deploy the summarization agent
# Deploy the agent first
# and then run the assistant
import os
from assistants.langassist.summarize_assistant import SummarizeAssistant
from dotenv import load_dotenv
from assistants.langregister.mongo_db_atlas import MongoAtlas
load_dotenv()
OPENAI_API_KEY = os.environ.get('OPENAI_API_KEY')
MONGO_PASSWORD = os.getenv("MONGO_PASSWORD")
mongo_client = MongoAtlas()
mongo_client.uri = "mongodb+srv://rajib76:{MONGO_PASSWORD}@cluster0.cp3rxai.mongodb.net/?retryWrites=true&w=majority".format(
MONGO_PASSWORD=MONGO_PASSWORD)
assistant_name = "summarize_assistant_03"
file = "gen_ai.pdf"
def deploy_assistant():
sc = SummarizeAssistant(file=file,assistant_name=assistant_name)
fileobj, assistantobj = sc.deploy_assistant(mongo_client)
print(fileobj,assistantobj)
def run_assistant():
sc = SummarizeAssistant(assistant_name=assistant_name)
question = "Summarize the content in 300 words. Please ensure all points are covered"
print(sc.run_assistant(question,client=mongo_client))
if __name__ == "__main__":
# First deploy
# deploy_assistant()
#Then run
run_assistant()
Metadata
Release files for langassist 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langassist-0.0.9.tar.gz | 10.8 kB | Without provenance | Details for langassist-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langassist-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for langassist-0.0.9-py3-none-any.whl |
Total release size: 24.5 kB
Release files / langassist-0.0.9.tar.gz
| Download URL | langassist-0.0.9.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b60f19fd1acfa6c9579783b6061a16785ff7b87520f31f0bc071bf4250e7767
|
|
BLAKE2b-256 checksum How to use checksums |
0319aea8a605436cee4c90b8101f0538a7ed1e4d2910d638e202ffbe1197de3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Release files / langassist-0.0.9-py3-none-any.whl
| Download URL | langassist-0.0.9-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d49404f9311b5db871498b0476b0f92eadf7c0943118ca4e63878bcf39689210
|
|
BLAKE2b-256 checksum How to use checksums |
a0c16c292c918f5ca5f6442041b4f01d48cb2f222303461d463f43b2ff99466c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for langassist 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.