From 1d31b33cccf268b0ce0a67f12eddb9f358f41564 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 21 Oct 2023 16:10:36 -0700 Subject: [PATCH] chore(eval): move tabby-python-client to eval dir --- Makefile | 12 --- .../tabby_client/models/debug_options.py | 57 ------------- experimental/eval/gen-client.sh | 14 +++ experimental/eval/python.yaml | 2 + .../eval}/tabby-python-client/.gitignore | 0 .../eval}/tabby-python-client/README.md | 18 ++-- .../eval}/tabby-python-client/pyproject.toml | 0 .../eval}/tabby-python-client/setup.py | 4 +- .../tabby_python_client}/__init__.py | 0 .../tabby_python_client}/api/__init__.py | 0 .../tabby_python_client}/api/v1/__init__.py | 0 .../tabby_python_client}/api/v1/completion.py | 0 .../tabby_python_client}/api/v1/event.py | 0 .../tabby_python_client}/api/v1/health.py | 0 .../api/v1beta/__init__.py | 0 .../tabby_python_client}/api/v1beta/search.py | 0 .../tabby_python_client}/client.py | 0 .../tabby_python_client}/errors.py | 0 .../tabby_python_client}/models/__init__.py | 0 .../models/chat_completion_chunk.py | 0 .../models/chat_completion_request.py | 0 .../tabby_python_client}/models/choice.py | 0 .../models/completion_request.py | 8 -- .../models/completion_response.py | 0 .../tabby_python_client}/models/debug_data.py | 38 +++++---- .../models/debug_options.py | 85 +++++++++++++++++++ .../models/health_state.py | 0 .../tabby_python_client}/models/hit.py | 0 .../models/hit_document.py | 0 .../models/log_event_request.py | 0 .../tabby_python_client}/models/message.py | 0 .../models/search_response.py | 0 .../tabby_python_client}/models/segments.py | 0 .../tabby_python_client}/models/snippet.py | 0 .../tabby_python_client}/models/version.py | 0 .../tabby_python_client}/py.typed | 0 .../tabby_python_client}/types.py | 0 37 files changed, 132 insertions(+), 106 deletions(-) delete mode 100644 clients/tabby-python-client/tabby_client/models/debug_options.py create mode 100755 experimental/eval/gen-client.sh create mode 100644 experimental/eval/python.yaml rename {clients => experimental/eval}/tabby-python-client/.gitignore (100%) rename {clients => experimental/eval}/tabby-python-client/README.md (86%) rename {clients => experimental/eval}/tabby-python-client/pyproject.toml (100%) rename {clients => experimental/eval}/tabby-python-client/setup.py (86%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/__init__.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/api/__init__.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/api/v1/__init__.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/api/v1/completion.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/api/v1/event.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/api/v1/health.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/api/v1beta/__init__.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/api/v1beta/search.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/client.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/errors.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/__init__.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/chat_completion_chunk.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/chat_completion_request.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/choice.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/completion_request.py (93%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/completion_response.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/debug_data.py (71%) create mode 100644 experimental/eval/tabby-python-client/tabby_python_client/models/debug_options.py rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/health_state.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/hit.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/hit_document.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/log_event_request.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/message.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/search_response.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/segments.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/snippet.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/models/version.py (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/py.typed (100%) rename {clients/tabby-python-client/tabby_client => experimental/eval/tabby-python-client/tabby_python_client}/types.py (100%) diff --git a/Makefile b/Makefile index f8d1ac4..26e45bf 100644 --- a/Makefile +++ b/Makefile @@ -30,15 +30,3 @@ update-openapi-doc: ["components", "schemas", "DebugOptions"] \ ])' | jq '.servers[0] |= { url: "https://playground.app.tabbyml.com", description: "Playground server" }' \ > website/static/openapi.json - -update-python-client: - rm -rf clients/tabby-python-client - curl http://localhost:8080/api-docs/openapi.json | jq ' \ - delpaths([ \ - ["paths", "/v1beta/chat/completions"] \ - ])' > /tmp/openapi.json - - cd clients && openapi-python-client generate \ - --path /tmp/openapi.json \ - --config ../experimental/openapi/python.yaml \ - --meta setup diff --git a/clients/tabby-python-client/tabby_client/models/debug_options.py b/clients/tabby-python-client/tabby_client/models/debug_options.py deleted file mode 100644 index e3aff2d..0000000 --- a/clients/tabby-python-client/tabby_client/models/debug_options.py +++ /dev/null @@ -1,57 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -import attr - -T = TypeVar("T", bound="DebugOptions") - - -@attr.s(auto_attribs=True) -class DebugOptions: - """ - Attributes: - enabled (bool): When true, returns debug_data in completion response. - """ - - enabled: bool - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - enabled = self.enabled - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "enabled": enabled, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - enabled = d.pop("enabled") - - debug_options = cls( - enabled=enabled, - ) - - debug_options.additional_properties = d - return debug_options - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/experimental/eval/gen-client.sh b/experimental/eval/gen-client.sh new file mode 100755 index 0000000..1f886d7 --- /dev/null +++ b/experimental/eval/gen-client.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -ex + +rm -rf tabby-python-client + +curl http://localhost:8080/api-docs/openapi.json | jq 'delpaths([ + ["paths", "/v1beta/chat/completions"] +])' > /tmp/openapi.json + +openapi-python-client generate \ + --path /tmp/openapi.json \ + --config ./python.yaml \ + --meta setup diff --git a/experimental/eval/python.yaml b/experimental/eval/python.yaml new file mode 100644 index 0000000..9c1d4c4 --- /dev/null +++ b/experimental/eval/python.yaml @@ -0,0 +1,2 @@ +project_name_override: tabby-python-client +package_name_override: tabby_python_client diff --git a/clients/tabby-python-client/.gitignore b/experimental/eval/tabby-python-client/.gitignore similarity index 100% rename from clients/tabby-python-client/.gitignore rename to experimental/eval/tabby-python-client/.gitignore diff --git a/clients/tabby-python-client/README.md b/experimental/eval/tabby-python-client/README.md similarity index 86% rename from clients/tabby-python-client/README.md rename to experimental/eval/tabby-python-client/README.md index ad7fb8b..bd32fba 100644 --- a/clients/tabby-python-client/README.md +++ b/experimental/eval/tabby-python-client/README.md @@ -5,7 +5,7 @@ A client library for accessing Tabby Server First, create a client: ```python -from tabby_client import Client +from tabby_python_client import Client client = Client(base_url="https://api.example.com") ``` @@ -13,7 +13,7 @@ client = Client(base_url="https://api.example.com") If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead: ```python -from tabby_client import AuthenticatedClient +from tabby_python_client import AuthenticatedClient client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken") ``` @@ -21,9 +21,9 @@ client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSec Now call your endpoint and use your models: ```python -from tabby_client.models import MyDataModel -from tabby_client.api.my_tag import get_my_data_model -from tabby_client.types import Response +from tabby_python_client.models import MyDataModel +from tabby_python_client.api.my_tag import get_my_data_model +from tabby_python_client.types import Response my_data: MyDataModel = get_my_data_model.sync(client=client) # or if you need more info (e.g. status_code) @@ -33,9 +33,9 @@ response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client) Or do the same thing with an async version: ```python -from tabby_client.models import MyDataModel -from tabby_client.api.my_tag import get_my_data_model -from tabby_client.types import Response +from tabby_python_client.models import MyDataModel +from tabby_python_client.api.my_tag import get_my_data_model +from tabby_python_client.types import Response my_data: MyDataModel = await get_my_data_model.asyncio(client=client) response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client) @@ -72,7 +72,7 @@ Things to know: 1. All path/query params, and bodies become method arguments. 1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above) -1. Any endpoint which did not have a tag will be in `tabby_client.api.default` +1. Any endpoint which did not have a tag will be in `tabby_python_client.api.default` ## Building / publishing this Client This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics: diff --git a/clients/tabby-python-client/pyproject.toml b/experimental/eval/tabby-python-client/pyproject.toml similarity index 100% rename from clients/tabby-python-client/pyproject.toml rename to experimental/eval/tabby-python-client/pyproject.toml diff --git a/clients/tabby-python-client/setup.py b/experimental/eval/tabby-python-client/setup.py similarity index 86% rename from clients/tabby-python-client/setup.py rename to experimental/eval/tabby-python-client/setup.py index b520cac..260220b 100644 --- a/clients/tabby-python-client/setup.py +++ b/experimental/eval/tabby-python-client/setup.py @@ -7,12 +7,12 @@ long_description = (here / "README.md").read_text(encoding="utf-8") setup( name="tabby-python-client", - version="0.3.1", + version="0.4.0-dev", description="A client library for accessing Tabby Server", long_description=long_description, long_description_content_type="text/markdown", packages=find_packages(), python_requires=">=3.8, <4", install_requires=["httpx >= 0.15.0, < 0.25.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"], - package_data={"tabby_client": ["py.typed"]}, + package_data={"tabby_python_client": ["py.typed"]}, ) diff --git a/clients/tabby-python-client/tabby_client/__init__.py b/experimental/eval/tabby-python-client/tabby_python_client/__init__.py similarity index 100% rename from clients/tabby-python-client/tabby_client/__init__.py rename to experimental/eval/tabby-python-client/tabby_python_client/__init__.py diff --git a/clients/tabby-python-client/tabby_client/api/__init__.py b/experimental/eval/tabby-python-client/tabby_python_client/api/__init__.py similarity index 100% rename from clients/tabby-python-client/tabby_client/api/__init__.py rename to experimental/eval/tabby-python-client/tabby_python_client/api/__init__.py diff --git a/clients/tabby-python-client/tabby_client/api/v1/__init__.py b/experimental/eval/tabby-python-client/tabby_python_client/api/v1/__init__.py similarity index 100% rename from clients/tabby-python-client/tabby_client/api/v1/__init__.py rename to experimental/eval/tabby-python-client/tabby_python_client/api/v1/__init__.py diff --git a/clients/tabby-python-client/tabby_client/api/v1/completion.py b/experimental/eval/tabby-python-client/tabby_python_client/api/v1/completion.py similarity index 100% rename from clients/tabby-python-client/tabby_client/api/v1/completion.py rename to experimental/eval/tabby-python-client/tabby_python_client/api/v1/completion.py diff --git a/clients/tabby-python-client/tabby_client/api/v1/event.py b/experimental/eval/tabby-python-client/tabby_python_client/api/v1/event.py similarity index 100% rename from clients/tabby-python-client/tabby_client/api/v1/event.py rename to experimental/eval/tabby-python-client/tabby_python_client/api/v1/event.py diff --git a/clients/tabby-python-client/tabby_client/api/v1/health.py b/experimental/eval/tabby-python-client/tabby_python_client/api/v1/health.py similarity index 100% rename from clients/tabby-python-client/tabby_client/api/v1/health.py rename to experimental/eval/tabby-python-client/tabby_python_client/api/v1/health.py diff --git a/clients/tabby-python-client/tabby_client/api/v1beta/__init__.py b/experimental/eval/tabby-python-client/tabby_python_client/api/v1beta/__init__.py similarity index 100% rename from clients/tabby-python-client/tabby_client/api/v1beta/__init__.py rename to experimental/eval/tabby-python-client/tabby_python_client/api/v1beta/__init__.py diff --git a/clients/tabby-python-client/tabby_client/api/v1beta/search.py b/experimental/eval/tabby-python-client/tabby_python_client/api/v1beta/search.py similarity index 100% rename from clients/tabby-python-client/tabby_client/api/v1beta/search.py rename to experimental/eval/tabby-python-client/tabby_python_client/api/v1beta/search.py diff --git a/clients/tabby-python-client/tabby_client/client.py b/experimental/eval/tabby-python-client/tabby_python_client/client.py similarity index 100% rename from clients/tabby-python-client/tabby_client/client.py rename to experimental/eval/tabby-python-client/tabby_python_client/client.py diff --git a/clients/tabby-python-client/tabby_client/errors.py b/experimental/eval/tabby-python-client/tabby_python_client/errors.py similarity index 100% rename from clients/tabby-python-client/tabby_client/errors.py rename to experimental/eval/tabby-python-client/tabby_python_client/errors.py diff --git a/clients/tabby-python-client/tabby_client/models/__init__.py b/experimental/eval/tabby-python-client/tabby_python_client/models/__init__.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/__init__.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/__init__.py diff --git a/clients/tabby-python-client/tabby_client/models/chat_completion_chunk.py b/experimental/eval/tabby-python-client/tabby_python_client/models/chat_completion_chunk.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/chat_completion_chunk.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/chat_completion_chunk.py diff --git a/clients/tabby-python-client/tabby_client/models/chat_completion_request.py b/experimental/eval/tabby-python-client/tabby_python_client/models/chat_completion_request.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/chat_completion_request.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/chat_completion_request.py diff --git a/clients/tabby-python-client/tabby_client/models/choice.py b/experimental/eval/tabby-python-client/tabby_python_client/models/choice.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/choice.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/choice.py diff --git a/clients/tabby-python-client/tabby_client/models/completion_request.py b/experimental/eval/tabby-python-client/tabby_python_client/models/completion_request.py similarity index 93% rename from clients/tabby-python-client/tabby_client/models/completion_request.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/completion_request.py index 98aed46..5c9844b 100644 --- a/clients/tabby-python-client/tabby_client/models/completion_request.py +++ b/experimental/eval/tabby-python-client/tabby_python_client/models/completion_request.py @@ -20,7 +20,6 @@ class CompletionRequest: fib(n - 2)'}} Attributes: - prompt (Union[Unset, None, str]): Example: def fib(n):. language (Union[Unset, None, str]): Language identifier, full list is maintained at https://code.visualstudio.com/docs/languages/identifiers Example: python. segments (Union[Unset, None, Segments]): @@ -30,7 +29,6 @@ class CompletionRequest: debug_options (Union[Unset, None, DebugOptions]): """ - prompt: Union[Unset, None, str] = UNSET language: Union[Unset, None, str] = UNSET segments: Union[Unset, None, "Segments"] = UNSET user: Union[Unset, None, str] = UNSET @@ -38,7 +36,6 @@ class CompletionRequest: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - prompt = self.prompt language = self.language segments: Union[Unset, None, Dict[str, Any]] = UNSET if not isinstance(self.segments, Unset): @@ -52,8 +49,6 @@ class CompletionRequest: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if prompt is not UNSET: - field_dict["prompt"] = prompt if language is not UNSET: field_dict["language"] = language if segments is not UNSET: @@ -71,8 +66,6 @@ class CompletionRequest: from ..models.segments import Segments d = src_dict.copy() - prompt = d.pop("prompt", UNSET) - language = d.pop("language", UNSET) _segments = d.pop("segments", UNSET) @@ -96,7 +89,6 @@ class CompletionRequest: debug_options = DebugOptions.from_dict(_debug_options) completion_request = cls( - prompt=prompt, language=language, segments=segments, user=user, diff --git a/clients/tabby-python-client/tabby_client/models/completion_response.py b/experimental/eval/tabby-python-client/tabby_python_client/models/completion_response.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/completion_response.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/completion_response.py diff --git a/clients/tabby-python-client/tabby_client/models/debug_data.py b/experimental/eval/tabby-python-client/tabby_python_client/models/debug_data.py similarity index 71% rename from clients/tabby-python-client/tabby_client/models/debug_data.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/debug_data.py index 9e2a57a..3f7eda2 100644 --- a/clients/tabby-python-client/tabby_client/models/debug_data.py +++ b/experimental/eval/tabby-python-client/tabby_python_client/models/debug_data.py @@ -15,33 +15,35 @@ T = TypeVar("T", bound="DebugData") class DebugData: """ Attributes: - prompt (str): - snippets (Union[Unset, List['Snippet']]): + snippets (Union[Unset, None, List['Snippet']]): + prompt (Union[Unset, None, str]): """ - prompt: str - snippets: Union[Unset, List["Snippet"]] = UNSET + snippets: Union[Unset, None, List["Snippet"]] = UNSET + prompt: Union[Unset, None, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - prompt = self.prompt - snippets: Union[Unset, List[Dict[str, Any]]] = UNSET + snippets: Union[Unset, None, List[Dict[str, Any]]] = UNSET if not isinstance(self.snippets, Unset): - snippets = [] - for snippets_item_data in self.snippets: - snippets_item = snippets_item_data.to_dict() + if self.snippets is None: + snippets = None + else: + snippets = [] + for snippets_item_data in self.snippets: + snippets_item = snippets_item_data.to_dict() - snippets.append(snippets_item) + snippets.append(snippets_item) + + prompt = self.prompt field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update( - { - "prompt": prompt, - } - ) + field_dict.update({}) if snippets is not UNSET: field_dict["snippets"] = snippets + if prompt is not UNSET: + field_dict["prompt"] = prompt return field_dict @@ -50,8 +52,6 @@ class DebugData: from ..models.snippet import Snippet d = src_dict.copy() - prompt = d.pop("prompt") - snippets = [] _snippets = d.pop("snippets", UNSET) for snippets_item_data in _snippets or []: @@ -59,9 +59,11 @@ class DebugData: snippets.append(snippets_item) + prompt = d.pop("prompt", UNSET) + debug_data = cls( - prompt=prompt, snippets=snippets, + prompt=prompt, ) debug_data.additional_properties = d diff --git a/experimental/eval/tabby-python-client/tabby_python_client/models/debug_options.py b/experimental/eval/tabby-python-client/tabby_python_client/models/debug_options.py new file mode 100644 index 0000000..624f34e --- /dev/null +++ b/experimental/eval/tabby-python-client/tabby_python_client/models/debug_options.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DebugOptions") + + +@attr.s(auto_attribs=True) +class DebugOptions: + """ + Attributes: + raw_prompt (Union[Unset, None, str]): When `raw_prompt` is specified, it will be passed directly to the + inference engine for completion. `segments` field in `CompletionRequest` will be ignored. + + This is useful for certain requests that aim to test the tabby's e2e quality. + return_snippets (Union[Unset, bool]): When true, returns `snippets` in `debug_data`. + return_prompt (Union[Unset, bool]): When true, returns `prompt` in `debug_data`. + disable_retrieval_augmented_code_completion (Union[Unset, bool]): When true, disable retrieval augmented code + completion. + """ + + raw_prompt: Union[Unset, None, str] = UNSET + return_snippets: Union[Unset, bool] = UNSET + return_prompt: Union[Unset, bool] = UNSET + disable_retrieval_augmented_code_completion: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + raw_prompt = self.raw_prompt + return_snippets = self.return_snippets + return_prompt = self.return_prompt + disable_retrieval_augmented_code_completion = self.disable_retrieval_augmented_code_completion + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if raw_prompt is not UNSET: + field_dict["raw_prompt"] = raw_prompt + if return_snippets is not UNSET: + field_dict["return_snippets"] = return_snippets + if return_prompt is not UNSET: + field_dict["return_prompt"] = return_prompt + if disable_retrieval_augmented_code_completion is not UNSET: + field_dict["disable_retrieval_augmented_code_completion"] = disable_retrieval_augmented_code_completion + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + raw_prompt = d.pop("raw_prompt", UNSET) + + return_snippets = d.pop("return_snippets", UNSET) + + return_prompt = d.pop("return_prompt", UNSET) + + disable_retrieval_augmented_code_completion = d.pop("disable_retrieval_augmented_code_completion", UNSET) + + debug_options = cls( + raw_prompt=raw_prompt, + return_snippets=return_snippets, + return_prompt=return_prompt, + disable_retrieval_augmented_code_completion=disable_retrieval_augmented_code_completion, + ) + + debug_options.additional_properties = d + return debug_options + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/clients/tabby-python-client/tabby_client/models/health_state.py b/experimental/eval/tabby-python-client/tabby_python_client/models/health_state.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/health_state.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/health_state.py diff --git a/clients/tabby-python-client/tabby_client/models/hit.py b/experimental/eval/tabby-python-client/tabby_python_client/models/hit.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/hit.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/hit.py diff --git a/clients/tabby-python-client/tabby_client/models/hit_document.py b/experimental/eval/tabby-python-client/tabby_python_client/models/hit_document.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/hit_document.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/hit_document.py diff --git a/clients/tabby-python-client/tabby_client/models/log_event_request.py b/experimental/eval/tabby-python-client/tabby_python_client/models/log_event_request.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/log_event_request.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/log_event_request.py diff --git a/clients/tabby-python-client/tabby_client/models/message.py b/experimental/eval/tabby-python-client/tabby_python_client/models/message.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/message.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/message.py diff --git a/clients/tabby-python-client/tabby_client/models/search_response.py b/experimental/eval/tabby-python-client/tabby_python_client/models/search_response.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/search_response.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/search_response.py diff --git a/clients/tabby-python-client/tabby_client/models/segments.py b/experimental/eval/tabby-python-client/tabby_python_client/models/segments.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/segments.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/segments.py diff --git a/clients/tabby-python-client/tabby_client/models/snippet.py b/experimental/eval/tabby-python-client/tabby_python_client/models/snippet.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/snippet.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/snippet.py diff --git a/clients/tabby-python-client/tabby_client/models/version.py b/experimental/eval/tabby-python-client/tabby_python_client/models/version.py similarity index 100% rename from clients/tabby-python-client/tabby_client/models/version.py rename to experimental/eval/tabby-python-client/tabby_python_client/models/version.py diff --git a/clients/tabby-python-client/tabby_client/py.typed b/experimental/eval/tabby-python-client/tabby_python_client/py.typed similarity index 100% rename from clients/tabby-python-client/tabby_client/py.typed rename to experimental/eval/tabby-python-client/tabby_python_client/py.typed diff --git a/clients/tabby-python-client/tabby_client/types.py b/experimental/eval/tabby-python-client/tabby_python_client/types.py similarity index 100% rename from clients/tabby-python-client/tabby_client/types.py rename to experimental/eval/tabby-python-client/tabby_python_client/types.py