diff --git a/.gitignore b/.gitignore index 68bc17f..63d77be 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,7 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + +# IDE + +.vscode/ \ No newline at end of file diff --git a/main.py b/main.py index 1d5d9ca..5ac7523 100644 --- a/main.py +++ b/main.py @@ -8,6 +8,9 @@ app = Dash(__name__) Magi = load_react_component(app, 'components', 'magi.js') WiseMan = load_react_component(app, 'components', 'wise_man.js') +# 質問 - question +# 解決 - resolution + app.layout = Magi(id='magi', children=[ WiseMan(id='melchior', name='MELCHIOR', order_number=1, status='yes'), WiseMan(id='baltasar', name='BALTASAR', order_number=2, status='no'), diff --git a/playground.py b/playground.py new file mode 100644 index 0000000..e17d155 --- /dev/null +++ b/playground.py @@ -0,0 +1,14 @@ +import openai + +response = openai.ChatCompletion.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Who won the world series in 2020?"}, + {"role": "assistant", + "content": "The Los Angeles Dodgers won the World Series in 2020."}, + {"role": "user", "content": "Where was it played?"} + ] +) + +print(response) diff --git a/requirements.txt b/requirements.txt index 81a0733..01b9657 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ dash==2.9.3 -dash-local-react-components==1.3.0 \ No newline at end of file +dash-local-react-components==1.3.0 +openai==0.27.6 \ No newline at end of file