beekeeper-core 1.0.6__tar.gz → 1.0.7__tar.gz
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.
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/PKG-INFO +1 -1
- beekeeper_core-1.0.7/beekeeper/core/guardrails/__init__.py +4 -0
- beekeeper_core-1.0.7/beekeeper/core/guardrails/base.py +15 -0
- beekeeper_core-1.0.7/beekeeper/core/guardrails/types.py +11 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/llms/decorators.py +1 -1
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/pyproject.toml +1 -1
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/.gitignore +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/README.md +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/document/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/document/base.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/embeddings/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/embeddings/base.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/evaluation/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/evaluation/context_similarity.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/flows/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/flows/ingestion_flow.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/llms/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/llms/base.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/llms/types.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/monitors/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/monitors/base.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/monitors/types.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/observers/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/observers/base.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/observers/types.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/prompts/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/prompts/base.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/prompts/utils.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/readers/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/readers/base.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/readers/directory.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/schema.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/text_chunkers/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/text_chunkers/base.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/text_chunkers/semantic.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/text_chunkers/sentence.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/text_chunkers/token.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/text_chunkers/utils.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/tools/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/tools/base.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/utils/pairwise.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/vector_stores/__init__.py +0 -0
- {beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/vector_stores/base.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: beekeeper-core
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.7
|
|
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>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from abc import ABC, abstractmethod
|
|
2
|
+
|
|
3
|
+
from beekeeper.core.guardrails.types import GuardrailResponse
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class BaseGuardrail(ABC):
|
|
7
|
+
"""Abstract base class defining the interface for LLMs."""
|
|
8
|
+
|
|
9
|
+
@classmethod
|
|
10
|
+
def class_name(cls) -> str:
|
|
11
|
+
return "BaseGuardrail"
|
|
12
|
+
|
|
13
|
+
@abstractmethod
|
|
14
|
+
def enforce(self, text: str, direction: str) -> GuardrailResponse:
|
|
15
|
+
"""Runs policies enforcement to specified guardrail."""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from typing import Any, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class GuardrailResponse(BaseModel):
|
|
7
|
+
"""Guardrail response."""
|
|
8
|
+
|
|
9
|
+
text: str = Field(..., description="Generated text response")
|
|
10
|
+
action: Optional[str] = Field(default=None, description="Action taken by the guardrail")
|
|
11
|
+
raw: Optional[Any] = Field(default=None)
|
|
@@ -5,7 +5,7 @@ from logging import getLogger
|
|
|
5
5
|
from typing import Callable
|
|
6
6
|
|
|
7
7
|
from beekeeper.core.llms.types import ChatMessage
|
|
8
|
-
from beekeeper.core.
|
|
8
|
+
from beekeeper.core.monitors.types import PayloadRecord
|
|
9
9
|
|
|
10
10
|
logger = getLogger(__name__)
|
|
11
11
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "beekeeper-core"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.7"
|
|
8
8
|
description = "Load any data in one line of code and connect with AI applications"
|
|
9
9
|
authors = [{ name = "Leonardo Furnielis", email = "leonardofurnielis@outlook.com" }]
|
|
10
10
|
license = { text = "Apache-2.0" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{beekeeper_core-1.0.6 → beekeeper_core-1.0.7}/beekeeper/core/evaluation/context_similarity.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|