Releases: yazon/token-probability-visualizer
Releases · yazon/token-probability-visualizer
v0.2.0
Release v0.2.0
New Features
- Azure OpenAI Service Integration: This release introduces support for Azure OpenAI services. Users can now configure the application to connect to their Azure OpenAI deployments, in addition to the standard OpenAI API.
- Configuration for Azure services (API key, endpoint, and API version) can be set via environment variables or a
.envfile. - A new "Service Type" selector has been added to the UI, allowing users to switch between "OpenAI (Standard)" and "Azure OpenAI" at runtime.
- The application will dynamically fetch available models or use appropriate defaults (e.g.,
gpt-35-turbofor Azure) based on the selected service.
- Configuration for Azure services (API key, endpoint, and API version) can be set via environment variables or a
Enhancements
- Improved Configuration:
- A
STARTUP_SERVICE_TYPEenvironment variable can now be set to define the default service (OpenAI or Azure) used when the application starts. - The
README.mdhas been updated with detailed instructions for configuring and using both standard OpenAI and Azure OpenAI services.
- A
- User Interface:
- The "Service Type" dropdown will indicate if Azure OpenAI is not configured on the backend and will default to standard OpenAI in such cases.
- Minor improvement to error message display on the frontend.
Technical Changes
- The backend
OpenAIClienthas been refactored to support initialization for both OpenAI and AzureOpenAI SDKs. - API endpoints for fetching models and generating text now accommodate the selected
service_type. - The
.env.examplefile has been updated with new variables for Azure configuration.
Release v0.1.0 - Initial Release
Release v0.1.0
This release introduces the Token Probability Visualizer, a web application designed to help users understand the token probabilities generated by OpenAI models.
Overview
The Token Probability Visualizer allows you to:
- Visualize token probabilities from OpenAI models in generated text.
- See color-coded tokens indicating different probability levels (high probability = green, low probability = red).
- Hover over tokens to view detailed probability information and alternative likely tokens.
Key Features
- Model Configuration: Select from available OpenAI models associated with your API key, adjust temperature, top_p, and maximum tokens.
- Interactive Prompting: Enter prompts and generate text with probability visualization.
- Detailed Insights: Hover over tokens for log probabilities and alternative token options.
- Customizable Legend: Default probability thresholds and colors are provided (details in
config.pyandmodels/token_processor.py).
Getting Started
- Installation: Please refer to the Installation Guide in the README for detailed setup instructions.
- Running the App: Follow the Running the Application steps in the README.
- Usage: See the Using the Application section for a guide on how to use the visualizer.
Requirements
- Python 3.10+
- Flask
- OpenAI API key (configured in a
.envfile)
Please report any issues or provide feedback.