Skip to content

Commit adcc5f7

Browse files
committed
build: 0.2.11
1 parent 92166a3 commit adcc5f7

File tree

11 files changed

+22
-17
lines changed

11 files changed

+22
-17
lines changed

ExceptNotifier/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,5 @@
131131
"ExceptWechatIpython",
132132
]
133133

134-
__version__ = "0.2.10"
134+
__version__ = "0.2.11"
135135
__author__ = "daniel park <parkminwoo1991@gmail.com>"

ExceptNotifier/base/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@
3333
"get_resp_openai_advice",
3434
]
3535

36-
__version__ = "0.2.10"
36+
__version__ = "0.2.11"
3737
__author__ = "daniel park <parkminwoo1991@gmail.com>"

ExceptNotifier/base/bard_receiver.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# Copyright 2023 parkminwoo
33
import bardapi
4-
from os import environ
4+
from os import environ
55

66

77
def receive_bard_advice(_BARD_API_KEY: str, error_message: str) -> str:
@@ -19,18 +19,20 @@ def receive_bard_advice(_BARD_API_KEY: str, error_message: str) -> str:
1919
if environ.get("_BARD_ADVICE_LANG") is None:
2020
input_text = f"Give me more explanation for the following error. And if you have a code example and a way to solve it, please suggest it. Please provide as much information as possible. error is {error_message}."
2121
else:
22-
if environ["_BARD_ADVICE_LANG"]=='ko':
22+
if environ["_BARD_ADVICE_LANG"] == "ko":
2323
input_text = f"다음 에러와 관련된 더 많은 설명을 알려줘. 그리고 만약 이 오류와 관련된 코드 예제 및 유용한 자료가 있다면 가능한 많이 알려줘. 오류는 {error_message} 입니다."
24-
elif environ["_BARD_ADVICE_LANG"]=='jp':
24+
elif environ["_BARD_ADVICE_LANG"] == "jp":
2525
input_text = f"いくつかのリンクまたはコード例を見つけてください。このエラーに関する詳細情報と、この問題に関連する StackOverflow URL を教えてください。 エラーは {error_message} です。"
2626
else:
27-
print('You can only use ko or jp for the _BARD_ADVICE_LANG variable. Hence, answers will be provided in English.')
27+
print(
28+
"You can only use ko or jp for the _BARD_ADVICE_LANG variable. Hence, answers will be provided in English."
29+
)
2830
input_text = f"Give me more explanation for the following error. And if you have a code example and a way to solve it, please suggest it. Please provide as much information as possible. error is {error_message}."
2931
else:
30-
input_text = f"{environ['_PROMPT_COMMAND']} error=={error_message}"
32+
input_text = f"{environ['_PROMPT_COMMAND']} error=={error_message}"
3133

3234
response = bardapi.core.Bard().get_answer(input_text)
33-
advice_msg = response['content']
35+
advice_msg = response["content"]
3436

3537
return advice_msg
3638

ExceptNotifier/base/openai_receiver.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import openai
44
from os import environ
55

6+
67
def receive_openai_advice(
78
_OPEN_AI_MODEL: str, _OPEN_AI_API: str, error_message: str
89
) -> str:
@@ -24,7 +25,7 @@ def receive_openai_advice(
2425
if environ.get("_PROMPT_COMMAND") is None:
2526
input_text = f"How can I fix this error? Give me short infomation about next error. Let me know which code line and which code is incorrect. and try to make it fix or fix exampel. error== {error_message}"
2627
else:
27-
input_text = f"{environ['_PROMPT_COMMAND']} error=={error_message}"
28+
input_text = f"{environ['_PROMPT_COMMAND']} error=={error_message}"
2829
resp = openai.ChatCompletion.create(
2930
model=model_engine, messages=[{"role": "user", "content": input_text}]
3031
)
@@ -49,7 +50,7 @@ def get_resp_openai_advice(
4950
openai.api_key = _OPEN_AI_API
5051
model_engine = _OPEN_AI_MODEL
5152

52-
53+
5354
def receive_openai_advice(
5455
_OPEN_AI_MODEL: str, _OPEN_AI_API: str, error_message: str
5556
) -> str:

ExceptNotifier/ipycore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
"ExceptDesktopIpython",
2929
]
3030

31-
__version__ = "0.2.10"
31+
__version__ = "0.2.11"
3232
__author__ = "daniel park <parkminwoo1991@gmail.com>"

ExceptNotifier/pycore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@
6868
"SendDesktop",
6969
]
7070

71-
__version__ = "0.2.10"
71+
__version__ = "0.2.11"
7272
__author__ = "daniel park <parkminwoo1991@gmail.com>"

ExceptNotifier/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77

88
__all__ = ["get_authorize_code", "save_token"]
9-
__version__ = "0.2.10"
9+
__version__ = "0.2.11"
1010
__author__ = "daniel park <parkminwoo1991@gmail.com>"

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def skip(app, what, name, obj, skip, options):
5050
exclude_patterns = ["_build", "**tests**", "**spi**"]
5151

5252
# The full version, including alpha/beta/rc tags
53-
release = "0.2.10"
53+
release = "0.2.11"
5454

5555

5656
# -- General configuration ---------------------------------------------------

documents/DEV_NOTE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ In upcoming updates, I aim to enhance the pylint score, eliminate superfluous in
9595
|0.2.8| Update equirement pacakge `bardapi` |
9696
|0.2.9| Fix without `_BARD_ADVICE_LANG` |
9797
|0.2.10| Update customize prompt in Open AI chatbot |
98+
|0.2.11| Fix check system variable of `_BARD_ADVICE_LANG` and modify some prompt. |
9899

99100
need Refactoring, QA.
100101

meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: "exceptnotifier"
3-
version: "0.2.10"
3+
version: "0.2.11"
44

55
source:
66
git_url: https://github.com/dsdanielpark/ExceptNotifier

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_long_description():
2525

2626
setup(
2727
name="exceptnotifier",
28-
version="0.2.10",
28+
version="0.2.11",
2929
author="daniel park",
3030
author_email="parkminwoo1991@gmail.com",
3131
description="With Python's try-except to receive notifications about Errors or Successes in your code through messenger app or email.",
@@ -40,7 +40,8 @@ def get_long_description():
4040
"openai",
4141
"discord",
4242
"sphinx-rtd-theme",
43-
"Sphinx", "bardapi"
43+
"Sphinx",
44+
"bardapi",
4445
],
4546
keywords="Exception, Python, Python Exception Alarm, Error notifications, Customizable notifications, Traceback management, Single line alarm",
4647
classifiers=[

0 commit comments

Comments
 (0)