beekeeper-core 1.0.4__py3-none-any.whl → 1.0.6__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.
@@ -0,0 +1,11 @@
1
+ from pydantic import BaseModel
2
+
3
+
4
+ class PayloadRecord(BaseModel):
5
+ """Payload record."""
6
+
7
+ input_text: str
8
+ generated_text: str
9
+ generated_token_count: int
10
+ input_token_count: int
11
+ response_time: int
@@ -22,6 +22,18 @@ class PromptTemplate(BaseModel):
22
22
  def __init__(self, template: str):
23
23
  super().__init__(template=template)
24
24
 
25
+ @classmethod
26
+ def from_value(cls, value: str) -> "PromptTemplate":
27
+ if isinstance(value, cls):
28
+ return value
29
+
30
+ if isinstance(value, str):
31
+ return cls(value)
32
+
33
+ raise TypeError(
34
+ f"Invalid type for parameter 'prompt_template'. Expected str or PromptTemplate, but received {type(value).__name__}."
35
+ )
36
+
25
37
  def format(self, **kwargs):
26
38
  """
27
39
  Formats the template using the provided dynamic variables.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beekeeper-core
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Load any data in one line of code and connect with AI applications
5
5
  Project-URL: Repository, https://github.com/beekeeper-ai/beekeeper
6
6
  Author-email: Leonardo Furnielis <leonardofurnielis@outlook.com>
@@ -17,8 +17,9 @@ beekeeper/core/monitors/base.py,sha256=3ooSfgVpWoRLe2TqizHMRK_bI5C-sla57aYJ47FmI
17
17
  beekeeper/core/monitors/types.py,sha256=s-4tB8OdeaCUIRvi6FLuib2u4Yl9evqQdCundNREXQY,217
18
18
  beekeeper/core/observers/__init__.py,sha256=Z5sDAajai4QLdGIrjq-vr5eJEBhriMMCw5u46j6xHvA,149
19
19
  beekeeper/core/observers/base.py,sha256=y1SE_0WQusKhVomFuZCkk42Jb7r93ZS6r_j8vs_Y_r4,1203
20
+ beekeeper/core/observers/types.py,sha256=s-4tB8OdeaCUIRvi6FLuib2u4Yl9evqQdCundNREXQY,217
20
21
  beekeeper/core/prompts/__init__.py,sha256=kFp2N5giNEMA4hc3eZqstqaZu0c0BRAnP0NuF5aUaqI,85
21
- beekeeper/core/prompts/base.py,sha256=cuRSv30aromymNO2wuuprrrWFm5PxRTymYoVqscK4Us,739
22
+ beekeeper/core/prompts/base.py,sha256=Edh77DuYm8lDhJvHazC5hgaiQEit-R4M-TWLX8-gIU0,1106
22
23
  beekeeper/core/prompts/utils.py,sha256=Cqpefzzxd6DxPbOKVyUCsIs-ibBGKhYU6ppYqhPT9vM,1378
23
24
  beekeeper/core/readers/__init__.py,sha256=vPCmWmK92LYL-R0LFcPqjOKFHqxW0xUP5r6M9GNxoqY,157
24
25
  beekeeper/core/readers/base.py,sha256=46VRNkCmKP2RWJT1-kRTSHG9SjY1xbhKUy1a7-OrgPg,418
@@ -34,6 +35,6 @@ beekeeper/core/tools/base.py,sha256=A6TXn7g3DAZMREYAobfVlyOBuJn_8mIeCByc5412L9Y,
34
35
  beekeeper/core/utils/pairwise.py,sha256=cpi8GItPFSYP4sjB5zgTFHi6JfBVWsMnNu8koA9VYQU,536
35
36
  beekeeper/core/vector_stores/__init__.py,sha256=R5SRG3YpOZqRwIfBLB8KVV6FALWqhIzIhCjRGj-bwPc,93
36
37
  beekeeper/core/vector_stores/base.py,sha256=YFW1ioZbFEcJovAh0ZCpHnj0eiXtZvqy_pj2lxPS92k,1652
37
- beekeeper_core-1.0.4.dist-info/METADATA,sha256=jQ78PrN-WvYM4Kmt_hLLEzPeWN_wrGk49mNGh826ZMY,1331
38
- beekeeper_core-1.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
- beekeeper_core-1.0.4.dist-info/RECORD,,
38
+ beekeeper_core-1.0.6.dist-info/METADATA,sha256=ACxa2czqkHqWHjpybQDEknXd3QwERin26d2T1D9Ip5E,1331
39
+ beekeeper_core-1.0.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
40
+ beekeeper_core-1.0.6.dist-info/RECORD,,