docs: restore correct uv setup instructions
This commit is contained in:
parent
3185e9f6a7
commit
f3282ca21d
1 changed files with 5 additions and 16 deletions
21
README.md
21
README.md
|
|
@ -13,7 +13,7 @@ A proxy server that lets you use Anthropic clients with Gemini or OpenAI models
|
||||||
|
|
||||||
- OpenAI API key 🔑
|
- OpenAI API key 🔑
|
||||||
- Google AI Studio (Gemini) API key (if using default provider) 🔑
|
- Google AI Studio (Gemini) API key (if using default provider) 🔑
|
||||||
- [uv](https://github.com/astral-sh/uv) (recommended) or pip installed.
|
- [uv](https://github.com/astral-sh/uv) installed.
|
||||||
|
|
||||||
### Setup 🛠️
|
### Setup 🛠️
|
||||||
|
|
||||||
|
|
@ -23,18 +23,11 @@ A proxy server that lets you use Anthropic clients with Gemini or OpenAI models
|
||||||
cd claude-code-openai
|
cd claude-code-openai
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Install dependencies**:
|
2. **Install uv** (if you haven't already):
|
||||||
Using uv (recommended):
|
|
||||||
```bash
|
```bash
|
||||||
uv venv # Create virtual environment (optional but recommended)
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
uv pip install fastapi uvicorn litellm python-dotenv httpx # Install main packages
|
|
||||||
```
|
|
||||||
Or using pip:
|
|
||||||
```bash
|
|
||||||
python -m venv .venv
|
|
||||||
source .venv/bin/activate # Or .\venv\Scripts\activate on Windows
|
|
||||||
pip install fastapi uvicorn litellm python-dotenv httpx
|
|
||||||
```
|
```
|
||||||
|
*(`uv` will handle dependencies based on `pyproject.toml` when you run the server)*
|
||||||
|
|
||||||
3. **Configure Environment Variables**:
|
3. **Configure Environment Variables**:
|
||||||
Copy the example environment file:
|
Copy the example environment file:
|
||||||
|
|
@ -55,14 +48,10 @@ A proxy server that lets you use Anthropic clients with Gemini or OpenAI models
|
||||||
- Otherwise (if `PREFERRED_PROVIDER=openai` or the specified Google model isn't known), they map to `SMALL_MODEL`/`BIG_MODEL` prefixed with `openai/`.
|
- Otherwise (if `PREFERRED_PROVIDER=openai` or the specified Google model isn't known), they map to `SMALL_MODEL`/`BIG_MODEL` prefixed with `openai/`.
|
||||||
|
|
||||||
4. **Run the server**:
|
4. **Run the server**:
|
||||||
Using uv:
|
|
||||||
```bash
|
```bash
|
||||||
uv run uvicorn server:app --host 0.0.0.0 --port 8082 --reload
|
uv run uvicorn server:app --host 0.0.0.0 --port 8082 --reload
|
||||||
```
|
```
|
||||||
Or directly with uvicorn (if installed globally or in activated venv):
|
*(`--reload` is optional, for development)*
|
||||||
```bash
|
|
||||||
uvicorn server:app --host 0.0.0.0 --port 8082 --reload
|
|
||||||
```
|
|
||||||
|
|
||||||
### Using with Claude Code 🎮
|
### Using with Claude Code 🎮
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue