Skip to content

Commit c9d79f6

Browse files
committed
๐Ÿ”ง Bump version to 0.1.2
1 parent afd9a90 commit c9d79f6

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

โ€Žprepsaa/cli.pyโ€Ž

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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

โ€Žprepsaa/services.pyโ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def answer_question(model_name: str, question: str) -> QnAModel:
2828
)
2929
model = llm_model_factory(model_name)
3030
chain = prompt | model | parser
31+
print("๐Ÿ”ฅ ์งˆ๋ฌธ์— ๋Œ€ํ•œ ๋‹ต๋ณ€์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค...")
3132
result = cast(QnAModel, chain.invoke({"question": question}))
3233
return result
3334

@@ -52,13 +53,15 @@ def explain_service(model_name: str, service_name: str) -> StudyNoteModel:
5253
)
5354
model = llm_model_factory(model_name)
5455
chain = prompt | model | parser
56+
print("๐Ÿ”ฅ ํ•™์Šต ๋…ธํŠธ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค...")
5557
result = cast(StudyNoteModel, chain.invoke({"input": service_name}))
5658
return result
5759

5860

5961
def save_to_notion(
6062
notion_client: NotionClient, service_name: str, content: str
6163
) -> None:
64+
print("๐Ÿ”ฅ ํ•™์Šต ๋…ธํŠธ๋ฅผ Notion์— ์ €์žฅํ•ฉ๋‹ˆ๋‹ค...")
6265
notion_client.pages.create(
6366
parent={"database_id": settings.notion_database_id},
6467
icon={"type": "emoji", "emoji": "๐Ÿ“š"},

โ€Žpyproject.tomlโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "prepsaa"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "AWS SAA ์‹œํ—˜ ๋Œ€๋น„๋ฅผ ์œ„ํ•œ LLM ๊ธฐ๋ฐ˜ CLI ๋„๊ตฌ"
55
readme = "README.md"
66
requires-python = ">=3.12"

0 commit comments

Comments
ย (0)