pinetext 0.1.1__py3-none-any.whl → 0.1.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.

Potentially problematic release.


This version of pinetext might be problematic. Click here for more details.

pinetext/client.py CHANGED
@@ -1,3 +1,6 @@
1
+ import wandb
2
+ import weave
3
+
1
4
  from pathlib import Path
2
5
 
3
6
  from pinecone import Pinecone
@@ -34,12 +37,16 @@ class PineText:
34
37
  timeout=None,
35
38
  )
36
39
 
40
+ @weave.op()
37
41
  def chat(self, text: str, model: str):
38
42
  msg = Message(role="user", content=text)
39
43
  resp = self.assistant.chat(messages=[msg], model=model)
40
44
  return resp.message.content
41
45
 
42
46
  def run(self):
47
+ if settings.wandb.api_key:
48
+ wandb.login(key=settings.wandb.api_key)
49
+ weave.init(settings.wandb.project)
43
50
  self.pinecone = Pinecone(api_key=settings.pinecone.api_key)
44
51
  self.assistant = self.get_or_create_assistant(settings.pinecone.assistant)
45
52
  self.upload_files(settings.pinecone.data_dir)
pinetext/settings.py CHANGED
@@ -9,8 +9,14 @@ class Pinecone(BaseModel):
9
9
  model: str | None = "o4-mini"
10
10
 
11
11
 
12
+ class WandB(BaseModel):
13
+ api_key: str | None = None
14
+ project: str | None = "pinetext"
15
+
16
+
12
17
  class Settings(BaseSettings):
13
18
  pinecone: Pinecone = Pinecone()
19
+ wandb: WandB = WandB()
14
20
  model_config = SettingsConfigDict(
15
21
  env_file=".env",
16
22
  env_file_encoding="utf-8",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pinetext
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: PineText
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.13
@@ -8,6 +8,8 @@ Requires-Dist: pinecone-plugin-assistant>=1.7.0
8
8
  Requires-Dist: pinecone>=7.3.0
9
9
  Requires-Dist: pydantic-settings>=2.10.1
10
10
  Requires-Dist: typer>=0.16.0
11
+ Requires-Dist: wandb>=0.21.1
12
+ Requires-Dist: weave>=0.51.59
11
13
  Description-Content-Type: text/markdown
12
14
 
13
15
  ## PineText
@@ -20,7 +22,7 @@ A lightweight assistant built using [Pinecone](https://docs.pinecone.io/guides/a
20
22
 
21
23
  ## Getting Started
22
24
 
23
- Use [uv](https://github.com/astral-sh/uv) to add and manage PineText as a dependency in your project, or install it directly via `uv pip install` or `pip install`. See the [Installation](https://github.com/ezhuk/modbus-mcp/blob/main/docs/modbus-mcp/installation.mdx) section of the documentation for full installation instructions and more details.
25
+ Use [uv](https://github.com/astral-sh/uv) to add and manage PineText as a dependency in your project, or install it directly via `uv pip install` or `pip install`. See the [Installation](https://github.com/ezhuk/pinetext/blob/main/docs/pinetext/installation.mdx) section of the documentation for full installation instructions and more details.
24
26
 
25
27
  ```bash
26
28
  uv add pinetext
@@ -81,6 +83,12 @@ docker run -it \
81
83
  ghcr.io/ezhuk/pinetext:latest
82
84
  ```
83
85
 
86
+ Or using Docker Compose:
87
+
88
+ ```bash
89
+ docker compose up
90
+ ```
91
+
84
92
  ## License
85
93
 
86
94
  The server is licensed under the [MIT License](https://github.com/ezhuk/pinetext?tab=MIT-1-ov-file).
@@ -0,0 +1,9 @@
1
+ pinetext/__init__.py,sha256=VQZQcYgadJGizofgf7Qe6vPlC8zIiv_kTiQC4Ftzfac,136
2
+ pinetext/cli.py,sha256=ensHQ7RQvsZG7PIvSEVsRLJEvgPOf5ZrVDRUi2ZsJJM,189
3
+ pinetext/client.py,sha256=hYKhaefZ4L6PUDvPxwicjnztlAkgVLIZxM8sr5he_18,1892
4
+ pinetext/settings.py,sha256=B4-gtpFlaz-M1Zf5RXC5MK2gh8faLLHUxtO7wWPCgsI,628
5
+ pinetext-0.1.3.dist-info/METADATA,sha256=b2xnAObh9KTS8ey0LTHpXBtXF2_iwbbv6vPRPCX_z48,2798
6
+ pinetext-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ pinetext-0.1.3.dist-info/entry_points.txt,sha256=kV_mlYLNZRAerrjTMaKHwpQoPAejaJ7Crjvpck5D3KQ,46
8
+ pinetext-0.1.3.dist-info/licenses/LICENSE,sha256=uSsFh4jumQQchhdeV61a1YhWRAp1GouNAoEduU_93kU,1068
9
+ pinetext-0.1.3.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- pinetext/__init__.py,sha256=VQZQcYgadJGizofgf7Qe6vPlC8zIiv_kTiQC4Ftzfac,136
2
- pinetext/cli.py,sha256=ensHQ7RQvsZG7PIvSEVsRLJEvgPOf5ZrVDRUi2ZsJJM,189
3
- pinetext/client.py,sha256=YSVTNMMverEVqjLliqy0TL8Y-Xo4fHDTgqDq3da0yXk,1715
4
- pinetext/settings.py,sha256=nkHmg2zilfJA7RDELJB6vaqfuisVygBv5FoMz9Zg0ew,507
5
- pinetext-0.1.1.dist-info/METADATA,sha256=kxB34o0p3XwyF7iM_fLzkVAwiu-3WH3ru5e0pYYKYNc,2686
6
- pinetext-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- pinetext-0.1.1.dist-info/entry_points.txt,sha256=kV_mlYLNZRAerrjTMaKHwpQoPAejaJ7Crjvpck5D3KQ,46
8
- pinetext-0.1.1.dist-info/licenses/LICENSE,sha256=uSsFh4jumQQchhdeV61a1YhWRAp1GouNAoEduU_93kU,1068
9
- pinetext-0.1.1.dist-info/RECORD,,