Skip to main content

A library to generate tags list from a text using OpenAI

Project description

Tags Generator

A Python library to generate a tags list from a text using OpenAI.

Features

  • Generate tags list from a text
  • Limit the number of tags (max_tags)
  • Order tags by relevance or randomly (order)

Installation

Install the package using pip:

pip install tags-generator

Usage

from tags_generator import TagsGenerator

# Set your OpenAI API key
openai_api_key = "your_openai_api_key"

# Initialize the TagsGenerator with custom attributes
tg = TagsGenerator(openai_api_key, max_tags=5, order='relevance')

# Generate tags from a text
text = "Create a step-by-step guide on building a pip library to distribution the library."
tags = tg.generate_tags(text)

print(tags)

Attributes

  • max_tags (integer, default=5): Define the maximum number of tags in the output list.
  • order (string, default='relevance'): Specify the order of tags based on their relevance. Options are 'relevance' or 'random'.

License

This project is licensed under the MIT License.

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

tags-generator-0.4.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tags_generator-0.4.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file tags-generator-0.4.0.tar.gz.

File metadata

  • Download URL: tags-generator-0.4.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for tags-generator-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3e131e2a436601ff76f7fe9406d4f8ee16e813fc5125eef626edce80c3510c06
MD5 e32a8113e36b4bc25d22db7c2db654bb
BLAKE2b-256 f96046089dd504bea3adb942f4e3fd543d772b0e559180f66391e5b53bf1fdf7

See more details on using hashes here.

File details

Details for the file tags_generator-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: tags_generator-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for tags_generator-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cd6a5f1da97575a4f1bb2b8186e0634cc37315b3d93fc0cfcb53986026dc309
MD5 ae2ad5da1efd5fb1165d6bf650a4a1d0
BLAKE2b-256 b3d01b594eef42230a5259fd59259cccd07ab45e1bf39322e9dcd3e40bf8d895

See more details on using hashes here.

Supported by

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