generated from opentensor/bittensor-subnet-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OpenAI Bittensor Miner README.md
- Loading branch information
1 parent
819d8e2
commit a1cb3f0
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# OpenAI Bittensor Miner | ||
|
||
This repository contains a Bittensor Miner that uses OpenAI's GPT-3.5-turbo model as its synapse. The miner connects to the Bittensor network, registers its wallet, and serves the GPT-3.5-turbo model to the network by attaching the prompt function to the axon. | ||
|
||
## Prerequisites | ||
|
||
- Python 3.8+ | ||
- OpenAI Python API (<https://github.com/openai/openai>) | ||
- Langchain (<https://github.com/langchain-ai/langchain>) | ||
|
||
## Installation | ||
|
||
1. Clone the repository | ||
2. Install the required packages with `pip install -r requirements.txt` | ||
3. Ensure that you have your OpenAI key in your os environment variable | ||
|
||
```bash | ||
# Sets your openai key in os envs variable | ||
export OPENAI_API_KEY='your_openai_key_here' | ||
|
||
# Verifies if openai key is set correctly | ||
echo "$OPENAI_API_KEY" | ||
``` | ||
|
||
For more configuration options related to the wallet, axon, subtensor, logging, and metagraph, please refer to the Bittensor documentation. | ||
|
||
## Example Usage | ||
|
||
To run the OpenAI Bittensor Miner with default settings, use the following command: | ||
|
||
```bash | ||
python3 -m pip install -r ./neurons/miner/openai/requirements.txt | ||
export OPENAI_API_KEY='sk-yourkey' | ||
python3 ./neurons/miner/openai/miner.py | ||
``` |