Skip to content

Commit

Permalink
fix: remove ape dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
shamuiscoding committed Sep 12, 2024
1 parent 2bd194c commit 46255c1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="weavel",
version="1.8.1",
version="1.8.2",
packages=find_namespace_packages(),
entry_points={},
description="Weavel, Prompt Optimization and Evaluation for LLM Applications",
Expand Down
2 changes: 1 addition & 1 deletion weavel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

from .utils import *

__version___ = "1.8.1"
__version___ = "1.8.2"
2 changes: 1 addition & 1 deletion weavel/_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from weavel._api_client import APIClient, AsyncAPIClient
from weavel.utils import logger
from weavel.types.datasets import DatasetItem, Dataset, Prompt, PromptVersion
from ape.types import ResponseFormat
from weavel.types.response_format import ResponseFormat

class Worker:
_instance = None
Expand Down
2 changes: 1 addition & 1 deletion weavel/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import time
from typing import Callable, Dict, List, Optional, Any, Union
from uuid import uuid4
from ape.types import ResponseFormat
from weavel.types.response_format import ResponseFormat

from dotenv import load_dotenv
from weavel._worker import Worker
Expand Down
2 changes: 1 addition & 1 deletion weavel/types/datasets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any, Dict, List, Optional, Union
from pydantic import BaseModel
from ape.types import ResponseFormat
from response_format import ResponseFormat

class DatasetItem(BaseModel):
uuid: Optional[str] = None
Expand Down
13 changes: 13 additions & 0 deletions weavel/types/response_format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from typing import Any, Dict, Literal, Optional
from pydantic import BaseModel


class JsonSchema(BaseModel):
name: str
schema: Dict[str, Any]
strict: bool = True


class ResponseFormat(BaseModel):
type: Literal["json_object", "json_schema", "xml"]
json_schema: Optional[JsonSchema] = None

0 comments on commit 46255c1

Please sign in to comment.