Skip to content

This project harnesses the power of Tiktoken and the OpenAI API to create a Python Streamlit web application with a primary focus on token counting and price estimation.

License

Notifications You must be signed in to change notification settings

rogerchang1108/OpenAI-API-Token-Counter-with-Tiktoken

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI-Token-Counter-with-Tiktoken

Welcome to my project repository! Here, I harness the power of Tiktoken and the OpenAI API to create a Python Streamlit web application with a primary focus on token counting and price estimation.

Features:

  • Token Counting: The application efficiently counts tokens, providing insightful analysis and statistics.

  • Price Estimation: Utilizing the OpenAI API, offering accurate price estimations for the tokens analyzed. Please note that accessing this feature requires an API key. It's important to be aware that charges may apply for requests made to the OpenAI API.

Note:

  • For accurate price estimations through the OpenAI API, users are required to possess an API key.

  • Additionally, it's crucial to understand that sending requests to the OpenAI API may incur charges.

Thank you for your interest in the project!

Usage:

  • Method 1: Access the web directly

    🌐 OpenAI API Token Counter with Tiktoken

  • Method 2: Run the application by yourself

    1. Clone the Repository:

      git clone https://github.com/rogerchang1108/OpenAI-API-Token-Counter-with-Tiktoken
      
    2. Install Dependencies:

      pip install -r requirements.txt
      
    3. Run the Application:

      streamlit run main.py
      
    4. Access the Web Application:

      Once the application is running, open your web browser and navigate to the provided local host address.

    5. Interact with the Application:

      Explore the token counting and price estimation features of my application.

      Don't forget to provide the necessary API key for accessing OpenAI services.

Enjoy exploring the application!

Resources

About

This project harnesses the power of Tiktoken and the OpenAI API to create a Python Streamlit web application with a primary focus on token counting and price estimation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages