@@ -53,22 +53,22 @@ def config_init():
5353 default = "" ,
5454 )
5555 notion_api_key = typer .prompt (
56- "Notion API Key๋ฅผ ์
๋ ฅํ์ธ์ (๋น์นธ์ผ๋ก ๋๋ฉด ํ๊ฒฝ ๋ณ์ ์ฌ์ฉ) : " ,
56+ "Notion API Key๋ฅผ ์
๋ ฅํ์ธ์: " ,
5757 default = "" ,
58- show_default = False , # Don't show empty default
58+ show_default = False ,
5959 )
6060 anthropic_api_key = typer .prompt (
61- "Anthropic API Key๋ฅผ ์
๋ ฅํ์ธ์ (๋น์นธ์ผ๋ก ๋๋ฉด ํ๊ฒฝ ๋ณ์ ์ฌ์ฉ) : " ,
61+ "Anthropic API Key๋ฅผ ์
๋ ฅํ์ธ์: " ,
6262 default = "" ,
6363 show_default = False ,
6464 )
6565 openai_api_key = typer .prompt (
66- "OpenAI API Key๋ฅผ ์
๋ ฅํ์ธ์ (๋น์นธ์ผ๋ก ๋๋ฉด ํ๊ฒฝ ๋ณ์ ์ฌ์ฉ) : " ,
66+ "OpenAI API Key๋ฅผ ์
๋ ฅํ์ธ์: " ,
6767 default = "" ,
6868 show_default = False ,
6969 )
7070 google_api_key = typer .prompt (
71- "Google API Key๋ฅผ ์
๋ ฅํ์ธ์ (๋น์นธ์ผ๋ก ๋๋ฉด ํ๊ฒฝ ๋ณ์ ์ฌ์ฉ) : " ,
71+ "Google API Key๋ฅผ ์
๋ ฅํ์ธ์: " ,
7272 default = "" ,
7373 show_default = False ,
7474 )
@@ -77,17 +77,12 @@ def config_init():
7777 "default_model" : default_model ,
7878 "alternative_model" : alternative_model ,
7979 "notion_database_id" : notion_db_id ,
80+ "notion_api_key" : notion_api_key ,
81+ "anthropic_api_key" : anthropic_api_key ,
82+ "openai_api_key" : openai_api_key ,
83+ "google_api_key" : google_api_key ,
8084 }
8185
82- if notion_api_key :
83- config_data ["notion_api_key" ] = notion_api_key
84- if anthropic_api_key :
85- config_data ["anthropic_api_key" ] = anthropic_api_key
86- if openai_api_key :
87- config_data ["openai_api_key" ] = openai_api_key
88- if google_api_key :
89- config_data ["google_api_key" ] = google_api_key
90-
9186 with open (CONFIG_FILE , "w" ) as f :
9287 f .write (json .dumps (config_data , indent = 2 ))
9388
@@ -142,9 +137,9 @@ def qna():
142137 break
143138
144139 result = answer_question (model , question )
145- print ("๐ก ์ ๋ต:\n \n " , result .answer )
146- print ("๐ ์ค๋ช
:\n \n " , result .explanation )
147- print ("โ๏ธ ์ธ๊ธ๋ ์๋น์ค:\n \n " , list (result .used_services ))
140+ print ("๐ก ์ ๋ต:\n \n " , result .answer , " \n \n " )
141+ print ("๐ ์ค๋ช
:\n \n " , result .explanation , " \n \n " )
142+ print ("โ๏ธ ์ธ๊ธ๋ ์๋น์ค:\n \n " , list (result .used_services ), " \n \n " )
148143
149144 try :
150145 response = _get_confirmation ()
@@ -158,6 +153,7 @@ def qna():
158153 model = settings .alternative_model
159154 print (f"๐ ๋ชจ๋ธ์ { model } ๋ก ๋ณ๊ฒฝ ํ ์ฌ์๋ํฉ๋๋ค." )
160155 need_new_question = False
156+ continue
161157 else :
162158 print ("๐ ํ๋ก๊ทธ๋จ์ ์ข
๋ฃํฉ๋๋ค." )
163159 break
0 commit comments