Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Develop #132

Merged
merged 14 commits into from
Dec 17, 2023
Merged
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
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ci:

repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.4.0
rev: v3.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
Expand Down Expand Up @@ -42,7 +42,7 @@ repos:
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: "src/libs"
Expand Down Expand Up @@ -76,25 +76,25 @@ repos:
exclude: "workflow/src/libs"

- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.11.0
hooks:
- id: black
exclude: "workflow/src/libs"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.286"
rev: "v0.1.7"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.7.1
hooks:
- id: mypy
exclude: "workflow/src/libs"

- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
rev: 1.7.6
hooks:
- id: bandit
exclude: "workflow/src/libs"
Expand Down
6 changes: 3 additions & 3 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@
<key>modifiers</key>
<integer>1048576</integer>
<key>modifiersubtext</key>
<string>Show repy in large text</string>
<string>Show reply in large text</string>
<key>vitoclose</key>
<false/>
</dict>
Expand Down Expand Up @@ -604,7 +604,7 @@
<key>modifiers</key>
<integer>1310720</integer>
<key>modifiersubtext</key>
<string>Show repy in large text and copy to clipboard</string>
<string>Show reply in large text and copy to clipboard</string>
<key>vitoclose</key>
<false/>
</dict>
Expand Down Expand Up @@ -1928,7 +1928,7 @@ python3 -c 'import custom_prompts; custom_prompts.custom_or_error_prompt_usage()
<key>removeextension</key>
<false/>
<key>text</key>
<string>🔓 Jailbreak was activated but no "ChatGPT jailbreak promt" is provided in the worksflow's configuration.</string>
<string>🔓 Jailbreak was activated but no "ChatGPT jailbreak prompt" is provided in the workflow's configuration.</string>
<key>title</key>
<string>ChatFred</string>
</dict>
Expand Down
Binary file removed workflow/src/libs/flet/bin/fletd
Binary file not shown.
5 changes: 3 additions & 2 deletions workflow/src/text_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

import openai

import flet as ft

openai.api_key = os.getenv("api_key")
if os.getenv("custom_api_url"):
openai.api_base = os.getenv("custom_api_url")
Expand All @@ -44,6 +42,9 @@
__unlocked = int(os.getenv("unlocked") or 0)
__stream_reply = int(os.getenv("stream_reply") or 0)

if __stream_reply:
import flet as ft


def time_it(func):
"""A decorator function that times the execution of a given function.
Expand Down