# Tezeta: A Package for Maximizing Context Window Utilization in Chatbots (Under Development)
> :warning: **Tezeta is currently under active development and is not yet functional. The features listed below are planned for future releases.**
Tezeta is a Python package designed to optimize memory in chatbots and Language Model (LLM) requests using relevance-based vector embeddings. This tool aims to maximize the utilization of context windows, thereby improving chatbot performance by allowing the storage and retrieval of more relevant conversation history.
### Supported Features
- Using vector embeddings to rank chats based on relevance with OpenAI embeddings and Pinecone
- Using ChromaDB as vector store with the default all-MiniLM-L6-v2
- Using ChromaDB as vector store
- Support for using Open Source Embedding Models locally (currently through all-MiniLM-L6-v2 with chromaDB)
## Planned Features
- Chunk up and rank sections of long text in a single chat or LLM request
- Support for using the Cohere API for Embeddings
## Installation
```bash
pip install tezeta
```
## Basic Usage
First, to set the necessary environment variables in your system, you can use the following terminal commands.
**For macOS/Linux:**
```bash
export PINECONE_API_KEY=your_api_key
export OPENAI_API_KEY=your_api_key
export PINECONE_ENVIRONMENT=your_pinecone_environment
```
**For Windows:**
```cmd
set PINECONE_API_KEY=your_api_key
set OPENAI_API_KEY=your_api_key
set PINECONE_ENVIRONMENT=your_pinecone_environment
```
You can use the package as follows:
```python
import tezeta
chats = [
{
"role" : "user",
"content" : "Wellness is an important part of wellbeing. How are you tackling that in your life"
},
{
"role" : "user",
"content" : "Hello there Jon, I'm a less relevant text that is trying really really hard to excluded from this test."
},
{
"role" : "assistant",
"content" : "I'm doing well, how are you?"
}
]
tezeta.set_max_tokens(30)
print(chats)
llm_chats = tezeta.chats.fit_messages(chats)
print (llm_chats)
```
## Documentation
Documentation will be available in the future.
## License
This project is licensed under the terms of the MIT license.
Raw data
{
"_id": null,
"home_page": "https://github.com/rediatbrook/tezeta",
"name": "tezeta",
"maintainer": "",
"docs_url": null,
"requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4",
"maintainer_email": "",
"keywords": "LLM,chatbot,memory,relevance,context window",
"author": "Rediat Shamsu",
"author_email": "rediatbrook@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e0/ed/dab05098e887768992e4c406bdf41aeaf7067e65ad0fab734737b7c7fa62/tezeta-0.0.1.tar.gz",
"platform": null,
"description": "# Tezeta: A Package for Maximizing Context Window Utilization in Chatbots (Under Development)\r\n\r\n> :warning: **Tezeta is currently under active development and is not yet functional. The features listed below are planned for future releases.**\r\n\r\nTezeta is a Python package designed to optimize memory in chatbots and Language Model (LLM) requests using relevance-based vector embeddings. This tool aims to maximize the utilization of context windows, thereby improving chatbot performance by allowing the storage and retrieval of more relevant conversation history.\r\n\r\n### Supported Features\r\n\r\n- Using vector embeddings to rank chats based on relevance with OpenAI embeddings and Pinecone\r\n- Using ChromaDB as vector store with the default all-MiniLM-L6-v2 \r\n- Using ChromaDB as vector store\r\n- Support for using Open Source Embedding Models locally (currently through all-MiniLM-L6-v2 with chromaDB)\r\n\r\n## Planned Features\r\n\r\n- Chunk up and rank sections of long text in a single chat or LLM request\r\n- Support for using the Cohere API for Embeddings\r\n\r\n## Installation\r\n\r\n```bash\r\npip install tezeta\r\n```\r\n\r\n## Basic Usage\r\n\r\nFirst, to set the necessary environment variables in your system, you can use the following terminal commands.\r\n\r\n**For macOS/Linux:**\r\n\r\n```bash\r\nexport PINECONE_API_KEY=your_api_key\r\nexport OPENAI_API_KEY=your_api_key\r\nexport PINECONE_ENVIRONMENT=your_pinecone_environment\r\n```\r\n\r\n**For Windows:**\r\n\r\n```cmd\r\nset PINECONE_API_KEY=your_api_key\r\nset OPENAI_API_KEY=your_api_key\r\nset PINECONE_ENVIRONMENT=your_pinecone_environment\r\n```\r\n\r\nYou can use the package as follows:\r\n```python\r\nimport tezeta\r\n\r\nchats = [\r\n {\r\n \"role\" : \"user\",\r\n \"content\" : \"Wellness is an important part of wellbeing. How are you tackling that in your life\"\r\n },\r\n {\r\n \"role\" : \"user\",\r\n \"content\" : \"Hello there Jon, I'm a less relevant text that is trying really really hard to excluded from this test.\"\r\n },\r\n {\r\n \"role\" : \"assistant\",\r\n \"content\" : \"I'm doing well, how are you?\"\r\n }\r\n]\r\n\r\ntezeta.set_max_tokens(30)\r\n\r\nprint(chats)\r\nllm_chats = tezeta.chats.fit_messages(chats)\r\nprint (llm_chats)\r\n```\r\n\r\n## Documentation\r\n\r\nDocumentation will be available in the future.\r\n\r\n## License\r\n\r\nThis project is licensed under the terms of the MIT license.\r\n",
"bugtrack_url": null,
"license": "",
"summary": "A package for memory in chatbots and LLM requests that uses relevance to maximize context window utilization.",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/rediatbrook/tezeta"
},
"split_keywords": [
"llm",
"chatbot",
"memory",
"relevance",
"context window"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e0eddab05098e887768992e4c406bdf41aeaf7067e65ad0fab734737b7c7fa62",
"md5": "de11118e8ad65d9d877c44951d9c2e69",
"sha256": "19f84035cb85c786dabef45c5d05e35861a1067624adccef63ed14c3d21deb88"
},
"downloads": -1,
"filename": "tezeta-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "de11118e8ad65d9d877c44951d9c2e69",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4",
"size": 5327,
"upload_time": "2023-08-10T05:57:31",
"upload_time_iso_8601": "2023-08-10T05:57:31.369331Z",
"url": "https://files.pythonhosted.org/packages/e0/ed/dab05098e887768992e4c406bdf41aeaf7067e65ad0fab734737b7c7fa62/tezeta-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-10 05:57:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rediatbrook",
"github_project": "tezeta",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "tezeta"
}