Rooni commited on
Commit
2528448
1 Parent(s): d74acb3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import json
5
  def generate_minecraft_command(description):
6
  headers = {
7
  'Content-Type': 'application/json',
8
- 'Authorization': 'Bearer YOUR_OPENAI_API_KEY' # Замените YOUR_OPENAI_API_KEY на свой API-ключ OpenAI
9
  }
10
 
11
  payload = {
@@ -13,7 +13,7 @@ def generate_minecraft_command(description):
13
  'max_tokens': 50
14
  }
15
 
16
- response = requests.post('https://api.openai.com/v1/engines/davinci-codex/completions', headers=headers, json=payload)
17
  data = json.loads(response.text)
18
  if 'choices' in data and len(data['choices']) > 0:
19
  command = data['choices'][0]['text'].strip()
 
5
  def generate_minecraft_command(description):
6
  headers = {
7
  'Content-Type': 'application/json',
8
+ 'Authorization': 'Bearer dummy'
9
  }
10
 
11
  payload = {
 
13
  'max_tokens': 50
14
  }
15
 
16
+ response = requests.post('https://copilot.github1s.tk/', headers=headers, json=payload)
17
  data = json.loads(response.text)
18
  if 'choices' in data and len(data['choices']) > 0:
19
  command = data['choices'][0]['text'].strip()