mirror of
https://github.com/PawanOsman/ChatGPT.git
synced 2026-07-18 08:05:57 +02:00
Update README.md
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user