Name | glyphdeck JSON |
Version |
1.1.2
JSON |
| download |
home_page | https://github.com/Kyle-Ross/glyphdeck |
Summary | The glyphdeck library is a comprehensive toolkit designed to streamline & simplify various aspects of asynchronous LLM data processing workflows over high-volume, dense semantic data - like customer feedback, reviews and comments. |
upload_time | 2024-10-08 14:53:02 |
maintainer | None |
docs_url | None |
author | Kyle Ross |
requires_python | <4.0.0,>=3.12.0 |
license | Elastic-2.0 |
keywords |
llm
openai
nlp
semantic
langchain
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# GlyphDeck
[![PyPI version](https://img.shields.io/pypi/v/glyphdeck)](https://pypi.org/project/glyphdeck/)
![Python versions](https://img.shields.io/pypi/pyversions/glyphdeck)
![License](https://img.shields.io/pypi/l/glyphdeck)
[![Go to documentation](https://readthedocs.org/projects/glyphdeck/badge/)](https://glyphdeck.readthedocs.io/en/latest/)
[![Read the Docs Badge](https://img.shields.io/badge/Read%20the%20Docs-8CA1AF?logo=readthedocs&logoColor=fff&style=flat)](https://glyphdeck.readthedocs.io/)
The glyphdeck library is a comprehensive toolkit designed to streamline
& simplify various aspects of asynchronous LLM data processing workflows
over high-volume, dense semantic data - like customer feedback, reviews
and comments.
Common aspects of the LLM data workflow are handled end-to-end including
async llm calls, data validation, sanitisation, transformation, caching
and step chaining, facilitating the fast development of robust, error
free LLM data workflows.
Its also equiped with caching and a configurable logging facility that
makes complex asyncronous LLM workflows much easier to configure,
understand and debug.
## Features
- **Asynchronous**: Rip through tabular data with asynchronous llm
usage
- **Auto-scaling**: Don't worry about api errors - the `LLMHandler`
automatically scales to your api limits
- **Rapid config**: Simple syntax in a highly abstracted interface
makes set up a breeze
- **Data chaining**: Automatically pass data between steps with the
`Cascade` class
- **Self validating**: The Cascade class automatically maintains
dataset integrity
- **Pydantic models**: Use built-in or custom Pydantic data models for
structured llm output
- **Type enforcement**: Get your structured data in the correct format
from the llm every time
- **Private data**: `Sanitiser` class strips out common private data
patterns before making api calls
- **Automatic caching**: Save on API costs and re-use results
- **Logging**: Built-in logging facility helps to debug your set-ups &
peer inside the event loop
## Set-up
### π§ Install
```
pip install glyphdeck
```
### π Set API Key
Set your `OPENAI_API_KEY` with a
[command](https://platform.openai.com/docs/quickstart?language-preference=python),
or add it to your [environment
variables](https://en.wikipedia.org/wiki/Environment_variable).
```
setx OPENAI_API_KEY "your_api_key_here"
```
### π₯ Import
``` python
import glyphdeck as gd
```
## Usage
### π Cascades
The `Cascade` class is the primary interface for the glyphdeck library.
It handles and processes data in a record-like structure, providing easy
to use syntax for LLM data handling workflows.
It validates and enforces all data movements against a common id,
ensuring that each record has a unique, immutable identifier that
remains consistent, regardless of other changes.
This all combines to let you spin up LLM workflows in record time.
### π Example
``` python
import glyphdeck as gd
# Provide a dataframe or a path to a file (csv or xlsx)
data_source = r"tests\testdata.pizzashopreviews.xlsx"
# Intialise cascade instance and identify the unique id (required) and target data
cascade = gd.Cascade(data_source, "Review", "Review Text")
# Optionally remove private information
cascade.sanitiser.run()
# Prepare the llm
cascade.set_llm_handler(
provider="OpenAI",
model="gpt-4o-mini",
system_message=(
"You are an expert pizza shop customer feedback analyst system."
"Analyse the feedback and return results in the correct format."
),
validation_model=gd.validators.SubCatsSentiment,
cache_identifier="pizzshop_sentiment",
)
# Run the llm_handler
cascade.llm_handler.run("llm_category_sentiment")
```
### β¨ Output
| Review Id | Review | Review_sub_categories | Review_sentiment_score |
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|------------------------|
| 1 | I love this place, fantastic pizza and great service. It's family run and it shows. Out of heaps of good local options it is still the⦠| Pizza Quality,Service Quality,Family Run,Local Options,Pricing,Parking | 0.95 |
| 2 | Got disappointed. Not good customer service. definitely not great pizza.We went there yesterday to⦠| Customer Service,Pizza Quality,Dine-In Experience,Promotions,Family Experience | -0.75 |
------------------------------------------------------------------------
#### π That's just the start!
Glyphdeck is highly customisable with useful optional commands in every
function, class & method. Use the Cascade and other tools to mix and
match, create feedback loops and more - all with blazing asynchronous
speed through the OpenAI API.
See the full capabilities in the extensive [documentation](https://glyphdeck.readthedocs.io/).
Raw data
{
"_id": null,
"home_page": "https://github.com/Kyle-Ross/glyphdeck",
"name": "glyphdeck",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>=3.12.0",
"maintainer_email": null,
"keywords": "llm, openai, nlp, semantic, langchain",
"author": "Kyle Ross",
"author_email": "107285758+Kyle-Ross@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/4c/67/e77214d2df70b3d7936ddbbd9553b25e3147051198b35480e66e5619746b/glyphdeck-1.1.2.tar.gz",
"platform": null,
"description": "# GlyphDeck\n[![PyPI version](https://img.shields.io/pypi/v/glyphdeck)](https://pypi.org/project/glyphdeck/)\n![Python versions](https://img.shields.io/pypi/pyversions/glyphdeck)\n![License](https://img.shields.io/pypi/l/glyphdeck)\n[![Go to documentation](https://readthedocs.org/projects/glyphdeck/badge/)](https://glyphdeck.readthedocs.io/en/latest/)\n[![Read the Docs Badge](https://img.shields.io/badge/Read%20the%20Docs-8CA1AF?logo=readthedocs&logoColor=fff&style=flat)](https://glyphdeck.readthedocs.io/)\n\nThe glyphdeck library is a comprehensive toolkit designed to streamline\n& simplify various aspects of asynchronous LLM data processing workflows\nover high-volume, dense semantic data - like customer feedback, reviews\nand comments.\n\nCommon aspects of the LLM data workflow are handled end-to-end including\nasync llm calls, data validation, sanitisation, transformation, caching\nand step chaining, facilitating the fast development of robust, error\nfree LLM data workflows.\n\nIts also equiped with caching and a configurable logging facility that\nmakes complex asyncronous LLM workflows much easier to configure,\nunderstand and debug.\n\n## Features\n\n- **Asynchronous**: Rip through tabular data with asynchronous llm\n usage\n- **Auto-scaling**: Don't worry about api errors - the `LLMHandler`\n automatically scales to your api limits\n- **Rapid config**: Simple syntax in a highly abstracted interface\n makes set up a breeze\n- **Data chaining**: Automatically pass data between steps with the\n `Cascade` class\n- **Self validating**: The Cascade class automatically maintains\n dataset integrity\n- **Pydantic models**: Use built-in or custom Pydantic data models for\n structured llm output\n- **Type enforcement**: Get your structured data in the correct format\n from the llm every time\n- **Private data**: `Sanitiser` class strips out common private data\n patterns before making api calls\n- **Automatic caching**: Save on API costs and re-use results\n- **Logging**: Built-in logging facility helps to debug your set-ups &\n peer inside the event loop\n\n## Set-up\n\n### \ud83d\udd27 Install\n\n``` \npip install glyphdeck\n```\n\n### \ud83d\udd11 Set API Key\n\nSet your `OPENAI_API_KEY` with a\n[command](https://platform.openai.com/docs/quickstart?language-preference=python),\nor add it to your [environment\nvariables](https://en.wikipedia.org/wiki/Environment_variable).\n\n``` \nsetx OPENAI_API_KEY \"your_api_key_here\"\n```\n\n### \ud83d\udce5 Import\n\n``` python\nimport glyphdeck as gd\n```\n\n## Usage\n\n### \ud83c\udf0a Cascades\n\nThe `Cascade` class is the primary interface for the glyphdeck library.\nIt handles and processes data in a record-like structure, providing easy\nto use syntax for LLM data handling workflows.\n\nIt validates and enforces all data movements against a common id,\nensuring that each record has a unique, immutable identifier that\nremains consistent, regardless of other changes.\n\nThis all combines to let you spin up LLM workflows in record time.\n\n### \ud83c\udfc4 Example\n\n``` python\nimport glyphdeck as gd\n\n# Provide a dataframe or a path to a file (csv or xlsx)\ndata_source = r\"tests\\testdata.pizzashopreviews.xlsx\"\n\n# Intialise cascade instance and identify the unique id (required) and target data\ncascade = gd.Cascade(data_source, \"Review\", \"Review Text\")\n\n# Optionally remove private information\ncascade.sanitiser.run()\n\n# Prepare the llm\ncascade.set_llm_handler(\n provider=\"OpenAI\",\n model=\"gpt-4o-mini\",\n system_message=(\n \"You are an expert pizza shop customer feedback analyst system.\"\n \"Analyse the feedback and return results in the correct format.\"\n ),\n validation_model=gd.validators.SubCatsSentiment,\n cache_identifier=\"pizzshop_sentiment\",\n)\n\n# Run the llm_handler\ncascade.llm_handler.run(\"llm_category_sentiment\")\n\n```\n\n### \u2728 Output\n\n| Review Id | Review | Review_sub_categories | Review_sentiment_score |\n|-----------|-----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|------------------------|\n| 1 | I love this place, fantastic pizza and great service. It's family run and it shows. Out of heaps of good local options it is still the\u2026 | Pizza Quality,Service Quality,Family Run,Local Options,Pricing,Parking | 0.95 |\n| 2 | Got disappointed. Not good customer service. definitely not great pizza.We went there yesterday to\u2026 | Customer Service,Pizza Quality,Dine-In Experience,Promotions,Family Experience | -0.75 |\n\n------------------------------------------------------------------------\n\n#### \ud83d\ude80 That's just the start!\n\nGlyphdeck is highly customisable with useful optional commands in every\nfunction, class & method. Use the Cascade and other tools to mix and\nmatch, create feedback loops and more - all with blazing asynchronous\nspeed through the OpenAI API.\n\nSee the full capabilities in the extensive [documentation](https://glyphdeck.readthedocs.io/).\n",
"bugtrack_url": null,
"license": "Elastic-2.0",
"summary": "The glyphdeck library is a comprehensive toolkit designed to streamline & simplify various aspects of asynchronous LLM data processing workflows over high-volume, dense semantic data - like customer feedback, reviews and comments.",
"version": "1.1.2",
"project_urls": {
"Documentation": "https://glyphdeck.readthedocs.io/en/latest/",
"Homepage": "https://github.com/Kyle-Ross/glyphdeck",
"Repository": "https://github.com/Kyle-Ross/glyphdeck"
},
"split_keywords": [
"llm",
" openai",
" nlp",
" semantic",
" langchain"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9d33e2343c0c9ee37d94bf1d5dd56e08509422cb7ced90991fe6c17b61de99cf",
"md5": "b47706626d9ebc2b532c33a9162e8b7a",
"sha256": "d116275e12182ad57cd2542db15051abf2d70064a5fc814958bed98d8dd71d69"
},
"downloads": -1,
"filename": "glyphdeck-1.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b47706626d9ebc2b532c33a9162e8b7a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.12.0",
"size": 55700,
"upload_time": "2024-10-08T14:53:01",
"upload_time_iso_8601": "2024-10-08T14:53:01.236637Z",
"url": "https://files.pythonhosted.org/packages/9d/33/e2343c0c9ee37d94bf1d5dd56e08509422cb7ced90991fe6c17b61de99cf/glyphdeck-1.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4c67e77214d2df70b3d7936ddbbd9553b25e3147051198b35480e66e5619746b",
"md5": "7705fe74f9fb98541df778852ff2e8da",
"sha256": "b8afdf3a0944f99a287d44a319c70d26048affcc778d2a5d6b7fe2b111062a6b"
},
"downloads": -1,
"filename": "glyphdeck-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "7705fe74f9fb98541df778852ff2e8da",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.12.0",
"size": 48052,
"upload_time": "2024-10-08T14:53:02",
"upload_time_iso_8601": "2024-10-08T14:53:02.541550Z",
"url": "https://files.pythonhosted.org/packages/4c/67/e77214d2df70b3d7936ddbbd9553b25e3147051198b35480e66e5619746b/glyphdeck-1.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-08 14:53:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Kyle-Ross",
"github_project": "glyphdeck",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "glyphdeck"
}