tumblrbot 1.4.2__py3-none-any.whl → 1.4.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tumblrbot/utils/models.py +5 -6
- {tumblrbot-1.4.2.dist-info → tumblrbot-1.4.3.dist-info}/METADATA +3 -1
- {tumblrbot-1.4.2.dist-info → tumblrbot-1.4.3.dist-info}/RECORD +5 -5
- {tumblrbot-1.4.2.dist-info → tumblrbot-1.4.3.dist-info}/WHEEL +0 -0
- {tumblrbot-1.4.2.dist-info → tumblrbot-1.4.3.dist-info}/entry_points.txt +0 -0
tumblrbot/utils/models.py
CHANGED
|
@@ -4,11 +4,12 @@ from typing import Annotated, Any, ClassVar, Literal, Self, override
|
|
|
4
4
|
import rich
|
|
5
5
|
from keyring import get_password, set_password
|
|
6
6
|
from openai import BaseModel
|
|
7
|
+
from pwinput import pwinput
|
|
7
8
|
from pydantic import ConfigDict, PlainSerializer, SecretStr
|
|
8
9
|
from pydantic.json_schema import SkipJsonSchema
|
|
9
10
|
from requests_oauthlib import OAuth1Session
|
|
10
11
|
from rich.panel import Panel
|
|
11
|
-
from rich.prompt import Confirm
|
|
12
|
+
from rich.prompt import Confirm
|
|
12
13
|
|
|
13
14
|
type SerializableSecretStr = Annotated[
|
|
14
15
|
SecretStr,
|
|
@@ -44,13 +45,11 @@ class Tokens(FullyValidatedModel):
|
|
|
44
45
|
|
|
45
46
|
@staticmethod
|
|
46
47
|
def online_token_prompt(url: str, *tokens: str) -> Generator[SecretStr]:
|
|
47
|
-
|
|
48
|
-
formatted_token_string = " and ".join(formatted_tokens)
|
|
48
|
+
formatted_token_string = " and ".join(f"[cyan]{token}[/]" for token in tokens)
|
|
49
49
|
|
|
50
50
|
rich.print(f"Retrieve your {formatted_token_string} from: {url}")
|
|
51
|
-
for token in
|
|
52
|
-
|
|
53
|
-
yield SecretStr(Prompt.ask(prompt, password=True).strip())
|
|
51
|
+
for token in tokens:
|
|
52
|
+
yield SecretStr(pwinput(f"Enter your {token} (masked): ").strip())
|
|
54
53
|
|
|
55
54
|
rich.print()
|
|
56
55
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tumblrbot
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.3
|
|
4
4
|
Summary: An updated bot that posts to Tumblr, based on your very own blog!
|
|
5
5
|
Requires-Python: >= 3.13
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -9,6 +9,7 @@ Requires-Dist: keyring
|
|
|
9
9
|
Requires-Dist: more-itertools
|
|
10
10
|
Requires-Dist: niquests[speedups, http3]
|
|
11
11
|
Requires-Dist: openai
|
|
12
|
+
Requires-Dist: pwinput
|
|
12
13
|
Requires-Dist: pydantic
|
|
13
14
|
Requires-Dist: pydantic-settings
|
|
14
15
|
Requires-Dist: requests
|
|
@@ -64,6 +65,7 @@ Features:
|
|
|
64
65
|
1. Provides cost estimates if the currently saved examples are used to fine-tune the [configured][config] model.
|
|
65
66
|
1. [Uploads examples][Fine-Tune] to [OpenAI] and begins the fine-tuning process.
|
|
66
67
|
- Resumes monitoring the same fine-tuning process when restarted.
|
|
68
|
+
- Deletes the uploaded examples file if fine-tuning does not succeed (optional).
|
|
67
69
|
- Stores the output model automatically when fine-tuning is completed.
|
|
68
70
|
1. [Generates and uploads posts][Generate] to the [configured][config] [Tumblr] blog using the [configured][config] fine-tuned model.
|
|
69
71
|
- Creates tags by extracting keywords at the [configured][config] frequency using the [configured][config] model.
|
|
@@ -8,9 +8,9 @@ tumblrbot/flow/generate.py,sha256=dtxxL4chXOOAj4iw7hTbzt4CqEZxgHJ5vytw8u3Iqbw,22
|
|
|
8
8
|
tumblrbot/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
tumblrbot/utils/common.py,sha256=Z_W_ph-NCjNYMs1DM0Ylwi9d-PvnI6Ij0rnH0XJaR0M,1342
|
|
10
10
|
tumblrbot/utils/config.py,sha256=EFQlgVYsDpPE-orgSnL96iJ4eL7zuXAxHKRWruEg-Zw,5165
|
|
11
|
-
tumblrbot/utils/models.py,sha256=
|
|
11
|
+
tumblrbot/utils/models.py,sha256=13sKzkxfVWTVpPDtV-yEUQu81-MY25CzDaywBw8Iajc,5273
|
|
12
12
|
tumblrbot/utils/tumblr.py,sha256=SYhhH32YQgg-tH2n2YjsOXOQEZrcxDaDNfbqgcl4v1M,1625
|
|
13
|
-
tumblrbot-1.4.
|
|
14
|
-
tumblrbot-1.4.
|
|
15
|
-
tumblrbot-1.4.
|
|
16
|
-
tumblrbot-1.4.
|
|
13
|
+
tumblrbot-1.4.3.dist-info/entry_points.txt,sha256=lTiN7PxAbyGY1fpCWApEw6NUIUgobfcOKhvn6cu3IQA,53
|
|
14
|
+
tumblrbot-1.4.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
15
|
+
tumblrbot-1.4.3.dist-info/METADATA,sha256=aJsUMoZvUkDFXX8vfTt1_UTq8aPeuumXz1fpm9R85LA,8701
|
|
16
|
+
tumblrbot-1.4.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|