Browse Source

connection ファイル追加

btc-sounds
みてるぞ 1 year ago
parent
commit
0b8f2500d1
3 changed files with 25 additions and 0 deletions
  1. +2
    -0
      .gitignore
  2. +7
    -0
      connection.sample.py
  3. +16
    -0
      talk.py

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
/connection.py


+ 7
- 0
connection.sample.py View File

@@ -0,0 +1,7 @@
# 各変数に適切な値を設定し,ファイル名を connection.py として保存すること

OPENAI_ORGANISATION = 'org-XXXXXXXXXXXXXXXXXXXXXXXX' \
# Organisation ID
OPENAI_API_KEY = 'sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
# API Key


+ 16
- 0
talk.py View File

@@ -0,0 +1,16 @@
from connection import *

import sys
import openai


class Talk:
@classmethod
def main (message: str) -> None:
openai.organization = OPENAI_ORGANISATION
openai.api_key = OPENAI_API_KEY


if __name__ == '__main__':
Talk.main (sys.argv[1])


Loading…
Cancel
Save