Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #106

Merged
merged 4 commits into from
Jan 30, 2024
Merged

Dev #106

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/re_edge_gpt_dev_python3_10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/re_edge_gpt_dev_python3_11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/re_edge_gpt_dev_python3_9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/re_edge_gpt_stable_python3_10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/re_edge_gpt_stable_python3_11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/re_edge_gpt_stable_python3_9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "re_edge_gpt_dev"
version = "0.0.25"
version = "0.0.26"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "re_edge_gpt"
version = "0.0.25"
version = "0.0.26"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down
9 changes: 9 additions & 0 deletions re_edge_gpt/chathub.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,12 @@ async def set_conversation(self, conversation_dict: dict) -> None:
self.conversation.struct[
"encrypted_conversation_signature"] = conversation_dict.get("encrypted_conversation_signature")
self.conversation.struct["conversation_signature"] = conversation_dict.get("conversation_signature")

async def delete_conversation(self, conversation_id: str = None, client_id: str = None,
encrypted_conversation_signature: str = None, conversation_signature: str = None
) -> None:
self.conversation.struct["conversationId"] = conversation_id
self.conversation.struct["client_id"] = client_id
self.conversation.struct[
"encrypted_conversation_signature"] = encrypted_conversation_signature
self.conversation.struct["conversation_signature"] = conversation_signature
5 changes: 2 additions & 3 deletions test/unit_test/manual_test/test_bot_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ async def test_ask() -> None:
str(Path(str(Path.cwd()) + "/copilot_cookies.json")), encoding="utf-8").read())
bot = await Chatbot.create(cookies=cookies, mode=mode)
response = await bot.ask(
prompt="Beef wellington recipe",
prompt="Chicken nuget recipe",
conversation_style=ConversationStyle.balanced,
simplify_response=True,
search_result=True
)
# If you are using non ascii char you need set ensure_ascii=False
Expand All @@ -46,4 +45,4 @@ async def test_ask() -> None:
loop = asyncio.get_running_loop()
except RuntimeError:
loop = asyncio.get_event_loop()
loop.run_until_complete(test_ask())
loop.run_until_complete(test_ask())
Loading