Update README.md

This commit is contained in:
Pawan Osman
2024-04-04 14:16:01 +03:00
committed by GitHub
parent e4a100f5ec
commit 148aff09ef
+4 -4
View File
@@ -107,8 +107,8 @@ Leverage the same integration code as OpenAI's official libraries by simply adju
```python
import openai
openai.api_key = 'pk-**********************************************' # For self-hosted version you can put anything
openai.base_url = "https://api.pawan.krd/v1/" # For self-hosted version, use "http://localhost:3040/v1/"
openai.api_key = 'anything'
openai.base_url = "http://localhost:3040/v1/"
completion = openai.chat.completions.create(
model="gpt-3.5-turbo",
@@ -126,8 +126,8 @@ print(completion.choices[0].message.content)
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: "pk-**********************************************", // For self-hosted version you can put anything
baseURL: "https://api.pawan.krd/v1", // For self-hosted version, use "http://localhost:3040/v1"
apiKey: "anything",
baseURL: "http://localhost:3040/v1",
});
const chatCompletion = await openai.chat.completions.create({