This Streamlit application provides a user interface for interacting with Unify models through chat. It allows users to select models and providers, input text, and view the conversation history with AI assistants.
Developed with the software and tools below.
Table of Contents
This Streamlit application provides a user interface for interacting with Unify models through chat. It allows users to select models and providers, input text, and view the conversation history with AI assistants.
- Chat UI: Interactive chat interface to communicate with AI assistants.
- Endpoint from Unify: Choose from a variety of models and providers.
- Conversation History: View and track the conversation history with each model.
- Clear History: Option to clear the conversation history for a fresh start.
-
Input Unify API Key: Enter your Unify API key in the provided text input box on the sidebar you can get the api key from here.
-
Select endpoints : Choose the models and providers from the sidebar dropdown menus.
-
Start Chatting: Type your message in the chat input box and press "Enter" or click the "Send" button.
-
View Conversation History: The conversation history with the AI assistant for each model is displayed in separate containers.
-
Clear History: You can clear the conversation history by clicking the "Clear History" button.
-
Vote: you can vote the model which one is doing great as it reflict in leaderboard.
-
Leaderboard: you can see the winner and losser model as globel result.
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── Procfile
├── README.md
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-310.pyc
│ └── helpers.cpython-310.pyc
├── app_screenshot_from_Kacper.png
├── chatbot_arena.py
├── detail_leaderboards.csv
├── detail_leaderboards.json
├── helpers.py
├── leaderboard.csv
├── models.json
├── pages
│ ├── 1_leaderboards.py
│ └── 2_import_model.py
├── requirements-test.txt
├── requirements.txt
├── test
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── __init__.cpython-310.pyc
│ │ └── test_app.cpython-310-pytest-8.2.0.pyc
│ └── test_helper.py
└── utils
├── __init__.py
├── logging.py
└── metadata.py
System Requirements:
- Python:
version >=3.10
-
Clone this repository:
git clone https://github.com/samthakur587/LLM_playground
-
change directory
cd LLM_playground
-
Install the required dependencies:
pip install -r requirements.txt
```bash
streamlit run stream.py
```
Run the test suite using the command below:
$ pytest -v test/*
-
► building a simple web app
-
► add gcp templte and dockerfile for deployment
-
► add precommit hooks for clean code writing
-
► merge the webapp into unify demos
-
► deploy the webapp to gcp
Contributions are welcome! Here are several ways you can contribute:
- Report Issues: Submit bugs found or log feature requests for the
LLM_playground
project. - Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/samthakur587/LLM_playground
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
from unify import AsyncUnify
import os
import asyncio
async_unify = AsyncUnify(
# This is the default and optional to include.
api_key=os.environ.get("UNIFY_KEY"),
endpoint="llama-2-13b-chat@anyscale"
)
async def main():
responses = await async_unify.generate(user_prompt="Hello Llama! Who was Isaac Newton?")
asyncio.run(main())