botrun-hatch 5.3.141__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.

Potentially problematic release.


This version of botrun-hatch might be problematic. Click here for more details.

File without changes
File without changes
@@ -0,0 +1,26 @@
1
+ from typing import List
2
+ from pydantic import BaseModel, Field
3
+
4
+ from botrun_hatch.models.upload_file import UploadFile
5
+
6
+
7
+ class Hatch(BaseModel):
8
+ """
9
+ @user_prompt_prefix: 每次的 user prompt 前面都會加入這段文字
10
+ @search_domain_filter: 搜尋的網域限制, 目前只有針對 perplexit 有效, 範例:["*.gov.tw", "-*.gov.cn"]
11
+ @files: 上傳的檔案,這裡存的是 metadata,真正的檔案會存在 gcs,以 user_id/id 為 key來存,目前只會存extract後純文字的內容
12
+ """
13
+
14
+ user_id: str
15
+ id: str
16
+ model_name: str = ""
17
+ prompt_template: str
18
+ user_prompt_prefix: str = ""
19
+ name: str = "" # 将 name 设为可选字段,默认为空字符串
20
+ is_default: bool = False
21
+ enable_search: bool = False
22
+ related_question_prompt: str = ""
23
+ search_vendor: str = "perplexity"
24
+ search_domain_filter: List[str] = []
25
+ files: List[UploadFile] = []
26
+ enable_agent: bool = False
@@ -0,0 +1,24 @@
1
+ from datetime import datetime, timedelta
2
+ from pydantic import BaseModel, Field
3
+
4
+
5
+ class UploadFile(BaseModel):
6
+ id: str = Field(..., description="File ID")
7
+ name: str = Field(..., description="File name")
8
+ updated_at: str = Field(..., description="Last update time in ISO format")
9
+ size: int = Field(..., description="File size in bytes")
10
+
11
+ @property
12
+ def formatted_size(self) -> str:
13
+ if self.size < 1024:
14
+ return f"{self.size} B"
15
+ elif self.size < 1024 * 1024:
16
+ return f"{self.size / 1024:.1f} KB"
17
+ elif self.size < 1024 * 1024 * 1024:
18
+ return f"{self.size / (1024 * 1024):.1f} MB"
19
+ return f"{self.size / (1024 * 1024 * 1024):.1f} GB"
20
+
21
+ @property
22
+ def formatted_date(self) -> str:
23
+ date = datetime.fromisoformat(self.updated_at)
24
+ return date.strftime("%Y-%m-%d")
@@ -0,0 +1,9 @@
1
+ from pydantic import BaseModel
2
+
3
+
4
+ class UserSetting(BaseModel):
5
+ user_id: str
6
+ default_model: str = ""
7
+ audio_reply: bool = False
8
+ search_vendor: str = "Botrun"
9
+ search_enabled: bool = False
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.3
2
+ Name: botrun-hatch
3
+ Version: 5.3.141
4
+ Summary:
5
+ Author: sebastian-hsu
6
+ Author-email: sebastian.hsu@gmail.com
7
+ Requires-Python: >=3.11,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Requires-Dist: pydantic-settings (>=2.5.2,<3.0.0)
13
+ Description-Content-Type: text/markdown
14
+
15
+ # 波孵
16
+
@@ -0,0 +1,8 @@
1
+ botrun_hatch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ botrun_hatch/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ botrun_hatch/models/hatch.py,sha256=poB_NCFeAZJZ2cFwv3IYij398ZcRUK5XAAX_BhQ0ceE,952
4
+ botrun_hatch/models/upload_file.py,sha256=bl5gN7wE_mArZQHjZTH9v9O20us45MTcjCUI1iUv1yk,863
5
+ botrun_hatch/models/user_setting.py,sha256=MLSM-0uTTwcpqU-Z6tfeRzKkRhoG3LkrKB7qBKC6ysw,205
6
+ botrun_hatch-5.3.141.dist-info/METADATA,sha256=UZvUq4JnyjDrwFBfpj3nWf2bk-R-JPUGxAy1zibbZRE,459
7
+ botrun_hatch-5.3.141.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
8
+ botrun_hatch-5.3.141.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.1.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any