Skip to main content

A FastAPI-based web server for working with LLMs, embedding models, and PostgresSQL.

Project description

TextWeaver

TextWeaver is a FastAPI-based web server designed for working with Large Language Models (LLMs), particularly Embeddings models. It simplifies the process of handling complex natural language processing tasks and offers a robust and scalable solution for both developers and researchers to store and query against embeddings in Pinecone.

Features

  • FastAPI Integration: Leverage the power of FastAPI for creating modern and efficient web APIs.
  • LLM and Embedding Support: Easily work with LLMs and various embedding models for rich textual analysis.
  • Scalable Architecture: Designed to grow with your needs, TextWeaver can be deployed across various environments.
  • User-Friendly Configuration: Get started quickly with intuitive configuration options.

Installation

To install TextWeaver, you need to have a .env file in the root directory of your project. This file should contain the following variables:

HOST_IP="" # The IP to bind the server to - 0.0.0.0 for all interfaces
PORT="" # The port to bind the server to - 80 for HTTP and 443 for HTTPS
AWS_ACCESS_KEY_ID="" # The access key ID for the AWS user (recommended to use an IAM role where possible, or a user with limited permissions)
AWS_SECRET_ACCESS_KEY="" # The secret access key for the AWS user
AWS_DEFAULT_REGION="" # The default region for the AWS user
AWS_COGNITO_REGION="" # The region for the AWS Cognito user pool
AWS_USER_POOL_ID="" # The ID for the AWS Cognito user pool
AWS_USER_POOL_CLIENT_ID="" # The client ID for the AWS Cognito user pool
SNS_TOPIC_NAME="" # The name of the SNS topic to errors and server events to
PINECONE_API_KEY="" # The API key for the Pinecone environment
PINECONE_ENVIRONMENT="" # The name of the Pinecone environment
PINECONE_INDEX_NAME="" # The name of the Pinecone index
MODEL_PATH="" # Where the model path is the appropriate path for the sentence_transformer model hosted on HuggingFace

Please note that TextWeaver requires the use of Amazon Cognito for authentication. You can find more information on how to set up Cognito here. Once you have Cognito set up, you can pass the required id tokens to the server using the Authorization header.

Install TextWeaver directly from PyPI using the following command:

pip install textweaver

Usage

Once installed, you can start the TextWeaver server using the following command:

textweaver

For further customization and detailed documentation, please refer to the project's repository.

Contribution

We welcome contributions from the community! Please check the contributing guidelines in the repository for more information on how you can get involved.

License

TextWeaver is released under the MIT License. See the LICENSE file in the repository for more details.

Contact

For any inquiries, support, or collaboration, please contact the author at wesladd@traingrc.com or open an issue on the project's GitHub page.

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

textweaver-0.2.8.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

textweaver-0.2.8-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file textweaver-0.2.8.tar.gz.

File metadata

  • Download URL: textweaver-0.2.8.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for textweaver-0.2.8.tar.gz
Algorithm Hash digest
SHA256 00572da5ddc2d2f000a4d7360e825dcc7667d819945b53b411ed8be41c15ac3b
MD5 de02607d55f07d415bfadc2ec2d3a31a
BLAKE2b-256 8fbda9dacc1769617f3b4ba663e63857d80f8b870b63768a6ba4569baa12d955

See more details on using hashes here.

File details

Details for the file textweaver-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: textweaver-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for textweaver-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bb5296ade7b9d081d2a1f3e425b1364a6ceaca0eceb07ee3e3c0953dd895fe9c
MD5 f0b170736457b7e01ca29dfae431ac72
BLAKE2b-256 aa0e03ae2956e399925b2fd0a88533deeb0f99b517132023b650faed47d22739

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page