Name | firstbatch JSON |
Version |
0.1.73
JSON |
| download |
home_page | |
Summary | FirstBatch SDK for integrating user embeddings to your project. Add real-time personalization to your AI application without user data. |
upload_time | 2023-11-26 18:32:12 |
maintainer | |
docs_url | None |
author | andthattoo |
requires_python | >=3.9,<3.13 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# FirstBatch SDK
The FirstBatch SDK provides an interface for integrating vector databases and powering personalized AI experiences in your application.
## Key Features
- Seamlessly manage user sessions with persistent IDs or temporary sessions
- Send signal actions like likes, clicks, etc. to update user embeddings in real-time
- Fetch personalized batches of data tailored to each user's embeddings
- Support for multiple vector database integrations: Pinecone, Weaviate, etc.
- Built-in algorithms for common personalization use cases
- Easy configuration with Python classes and environment variables
## Getting Started
### Prerequisites
- Python 3.9+
- API keys for FirstBatch and your chosen vector database
### Installation
```
pip install firstbatch
```
## Basic Usage
1. **Initialize VectorDB of your choice**
```python
api_key = os.environ["PINECONE_API_KEY"]
env = os.environ["PINECONE_ENV"]
pinecone.init(api_key=api_key, environment=env)
index = pinecone.Index("your_index_name")
# Init FirstBatch
config = Config(batch_size=20)
personalized = FirstBatch(api_key=os.environ["FIRSTBATCH_API_KEY"], config=config)
personalized.add_vdb("my_db", Pinecone(index, embedding_size=1536))
```
### Personalization
2. **Create a session with an Algorithm suiting your needs**
```python
session = personalized.session(algorithm=AlgorithmLabel.AI_AGENTS, vdbid="my_db")
```
3. **Make recommendations**
```python
ids, batch = personalized.batch(session)
```
4. **Let users add signals to shape their embeddings**
```python
user_pick = 0 # User liked the first content from the previous batch.
personalized.add_signal(session, UserAction(Signal.LIKE), ids[user_pick])
```
## Support
For any issues or queries contact `support@firstbatch.xyz`.
## Resources
- [User Embedding Guide](https://firstbatch.gitbook.io/user-embeddings/)
- [SDK Documentation](https://firstbatch.gitbook.io/firstbatch-sdk/)
Feel free to dive into the technicalities and leverage FirstBatch SDK for highly personalized user experiences.
Raw data
{
"_id": null,
"home_page": "",
"name": "firstbatch",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<3.13",
"maintainer_email": "",
"keywords": "",
"author": "andthattoo",
"author_email": "omer@firstbatch.xyz",
"download_url": "https://files.pythonhosted.org/packages/5f/2b/93c32aace30a0e817a7a9de79c31b9009f119cc2c5399e2ac62672dd6564/firstbatch-0.1.73.tar.gz",
"platform": null,
"description": "# FirstBatch SDK\n\nThe FirstBatch SDK provides an interface for integrating vector databases and powering personalized AI experiences in your application.\n\n## Key Features\n\n- Seamlessly manage user sessions with persistent IDs or temporary sessions\n- Send signal actions like likes, clicks, etc. to update user embeddings in real-time\n- Fetch personalized batches of data tailored to each user's embeddings \n- Support for multiple vector database integrations: Pinecone, Weaviate, etc.\n- Built-in algorithms for common personalization use cases\n- Easy configuration with Python classes and environment variables\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.9+\n- API keys for FirstBatch and your chosen vector database\n\n### Installation\n\n```\npip install firstbatch\n```\n\n## Basic Usage\n\n1. **Initialize VectorDB of your choice**\n ```python\n api_key = os.environ[\"PINECONE_API_KEY\"]\n env = os.environ[\"PINECONE_ENV\"]\n\n pinecone.init(api_key=api_key, environment=env)\n index = pinecone.Index(\"your_index_name\")\n \n # Init FirstBatch\n config = Config(batch_size=20)\n personalized = FirstBatch(api_key=os.environ[\"FIRSTBATCH_API_KEY\"], config=config)\n \n personalized.add_vdb(\"my_db\", Pinecone(index, embedding_size=1536))\n ```\n\n### Personalization\n\n2. **Create a session with an Algorithm suiting your needs**\n ```python \n session = personalized.session(algorithm=AlgorithmLabel.AI_AGENTS, vdbid=\"my_db\")\n ```\n\n3. **Make recommendations**\n ```python\n ids, batch = personalized.batch(session)\n ```\n4. **Let users add signals to shape their embeddings**\n ```python\n user_pick = 0 # User liked the first content from the previous batch.\n personalized.add_signal(session, UserAction(Signal.LIKE), ids[user_pick])\n ```\n\n## Support\n\nFor any issues or queries contact `support@firstbatch.xyz`.\n\n \n## Resources\n\n- [User Embedding Guide](https://firstbatch.gitbook.io/user-embeddings/)\n- [SDK Documentation](https://firstbatch.gitbook.io/firstbatch-sdk/)\n\nFeel free to dive into the technicalities and leverage FirstBatch SDK for highly personalized user experiences.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "FirstBatch SDK for integrating user embeddings to your project. Add real-time personalization to your AI application without user data.",
"version": "0.1.73",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ef27d0d58f7b0caa33d9441b16ddf69de3405ddc266b00facf04cde3d12ab5b2",
"md5": "fc5988d93ff613fd5c70dbcbb60b82a3",
"sha256": "42d8e88dcdcfa5fddc03275c3eb97fbd55478ced67ce3538be5f9247c80b90aa"
},
"downloads": -1,
"filename": "firstbatch-0.1.73-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fc5988d93ff613fd5c70dbcbb60b82a3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<3.13",
"size": 50738,
"upload_time": "2023-11-26T18:32:10",
"upload_time_iso_8601": "2023-11-26T18:32:10.487590Z",
"url": "https://files.pythonhosted.org/packages/ef/27/d0d58f7b0caa33d9441b16ddf69de3405ddc266b00facf04cde3d12ab5b2/firstbatch-0.1.73-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5f2b93c32aace30a0e817a7a9de79c31b9009f119cc2c5399e2ac62672dd6564",
"md5": "45aa2f9e059ffc47626cc4d7ba8301f2",
"sha256": "806d6dbe82960965cf7faa59265cd1dedad199e02d03f62539af5aacb9fe527c"
},
"downloads": -1,
"filename": "firstbatch-0.1.73.tar.gz",
"has_sig": false,
"md5_digest": "45aa2f9e059ffc47626cc4d7ba8301f2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<3.13",
"size": 93906,
"upload_time": "2023-11-26T18:32:12",
"upload_time_iso_8601": "2023-11-26T18:32:12.704790Z",
"url": "https://files.pythonhosted.org/packages/5f/2b/93c32aace30a0e817a7a9de79c31b9009f119cc2c5399e2ac62672dd6564/firstbatch-0.1.73.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-26 18:32:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "firstbatch"
}