├── tests ├── __init__.py ├── conftest.py └── test_exceptions.py ├── kbmanager ├── __init__.py ├── open_web_ui_client │ ├── py.typed │ ├── api │ │ ├── __init__.py │ │ ├── audio │ │ │ └── __init__.py │ │ ├── auths │ │ │ └── __init__.py │ │ ├── channels │ │ │ └── __init__.py │ │ ├── chats │ │ │ └── __init__.py │ │ ├── configs │ │ │ └── __init__.py │ │ ├── default │ │ │ └── __init__.py │ │ ├── files │ │ │ └── __init__.py │ │ ├── folders │ │ │ └── __init__.py │ │ ├── groups │ │ │ └── __init__.py │ │ ├── images │ │ │ └── __init__.py │ │ ├── memories │ │ │ └── __init__.py │ │ ├── models │ │ │ └── __init__.py │ │ ├── notes │ │ │ └── __init__.py │ │ ├── ollama │ │ │ └── __init__.py │ │ ├── openai │ │ │ └── __init__.py │ │ ├── prompts │ │ │ └── __init__.py │ │ ├── tasks │ │ │ └── __init__.py │ │ ├── tools │ │ │ └── __init__.py │ │ ├── users │ │ │ └── __init__.py │ │ ├── utils │ │ │ └── __init__.py │ │ ├── evaluations │ │ │ └── __init__.py │ │ ├── functions │ │ │ └── __init__.py │ │ ├── knowledge │ │ │ └── __init__.py │ │ ├── pipelines │ │ │ └── __init__.py │ │ └── retrieval │ │ │ └── __init__.py │ ├── __init__.py │ ├── errors.py │ ├── models │ │ ├── model_params.py │ │ ├── chat_form_chat.py │ │ ├── event_form_data.py │ │ ├── chat_response_chat.py │ │ ├── chat_response_meta.py │ │ ├── note_form_data_type_0.py │ │ ├── note_form_meta_type_0.py │ │ ├── tag_model_meta_type_0.py │ │ ├── file_model_data_type_0.py │ │ ├── file_model_meta_type_0.py │ │ ├── note_model_data_type_0.py │ │ ├── note_model_meta_type_0.py │ │ ├── user_model_info_type_0.py │ │ ├── folder_form_data_type_0.py │ │ ├── channel_form_data_type_0.py │ │ ├── channel_form_meta_type_0.py │ │ ├── folder_model_data_type_0.py │ │ ├── folder_model_meta_type_0.py │ │ ├── message_form_data_type_0.py │ │ ├── message_form_meta_type_0.py │ │ ├── channel_model_data_type_0.py │ │ ├── channel_model_meta_type_0.py │ │ ├── feedback_form_meta_type_0.py │ │ ├── folder_model_items_type_0.py │ │ ├── import_config_form_config.py │ │ ├── message_model_data_type_0.py │ │ ├── message_model_meta_type_0.py │ │ ├── snapshot_data_chat_type_0.py │ │ ├── feedback_model_data_type_0.py │ │ ├── feedback_model_meta_type_0.py │ │ ├── group_response_data_type_0.py │ │ ├── group_response_meta_type_0.py │ │ ├── knowledge_form_data_type_0.py │ │ ├── file_metadata_response_meta.py │ │ ├── group_form_permissions_type_0.py │ │ ├── feedback_model_snapshot_type_0.py │ │ ├── file_model_response_data_type_0.py │ │ ├── knowledge_response_data_type_0.py │ │ ├── knowledge_response_meta_type_0.py │ │ ├── model_meta_capabilities_type_0.py │ │ ├── note_form_access_control_type_0.py │ │ ├── tool_form_access_control_type_0.py │ │ ├── file_model_access_control_type_0.py │ │ ├── model_form_access_control_type_0.py │ │ ├── note_model_access_control_type_0.py │ │ ├── tool_model_access_control_type_0.py │ │ ├── group_response_permissions_type_0.py │ │ ├── message_user_response_data_type_0.py │ │ ├── message_user_response_meta_type_0.py │ │ ├── model_model_access_control_type_0.py │ │ ├── prompt_form_access_control_type_0.py │ │ ├── channel_form_access_control_type_0.py │ │ ├── generate_embed_form_options_type_0.py │ │ ├── prompt_model_access_control_type_0.py │ │ ├── channel_model_access_control_type_0.py │ │ ├── tool_response_access_control_type_0.py │ │ ├── group_update_form_permissions_type_0.py │ │ ├── knowledge_files_response_data_type_0.py │ │ ├── knowledge_files_response_meta_type_0.py │ │ ├── knowledge_form_access_control_type_0.py │ │ ├── model_response_access_control_type_0.py │ │ ├── tool_server_connection_config_type_0.py │ │ ├── ollama_config_form_ollama_api_configs.py │ │ ├── chat_title_messages_form_messages_item.py │ │ ├── generate_completion_form_format_type_0.py │ │ ├── generate_completion_form_options_type_0.py │ │ ├── generate_embeddings_form_options_type_0.py │ │ ├── embeddings_api_embeddings_post_form_data.py │ │ ├── knowledge_response_access_control_type_0.py │ │ ├── session_user_response_permissions_type_0.py │ │ ├── knowledge_response_files_type_0_item_type_1.py │ │ ├── comfy_ui_config_form_comfyuiworkflownodes_item.py │ │ ├── knowledge_files_response_access_control_type_0.py │ │ ├── chat_completed_api_chat_completed_post_form_data.py │ │ ├── body_upload_file_api_v1_files_post_metadata_type_0.py │ │ ├── chat_completion_api_chat_completions_post_form_data.py │ │ ├── chat_action_api_chat_actions_action_id_post_form_data.py │ │ ├── update_config_form_evaluationarenamodels_type_0_item.py │ │ ├── generate_chat_completion_ollama_api_chat_post_form_data.py │ │ ├── generate_emoji_api_v1_tasks_emoji_completions_post_form_data.py │ │ ├── generate_title_api_v1_tasks_title_completions_post_form_data.py │ │ ├── url_form.py │ │ ├── generate_chat_tags_api_v1_tasks_tags_completions_post_form_data.py │ │ ├── tag_form.py │ │ ├── code_form.py │ │ ├── generate_chat_completion_openai_chat_completions_post_form_data.py │ │ ├── generate_openai_completion_ollama_v1_completions_post_form_data.py │ │ ├── generate_queries_api_v1_tasks_queries_completions_post_form_data.py │ │ ├── load_tool_from_url_api_v1_tools_load_url_post_response_200_type_0.py │ │ ├── generate_moa_response_api_v1_tasks_moa_completions_post_form_data.py │ │ ├── markdown_form.py │ │ ├── load_url_form.py │ │ ├── generate_autocompletion_api_v1_tasks_auto_completions_post_form_data.py │ │ ├── reaction_form.py │ │ ├── generate_follow_ups_api_v1_tasks_follow_up_completions_post_form_data.py │ │ ├── get_tools_valves_by_id_api_v1_tools_id_id_valves_get_response_200_type_0.py │ │ ├── update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_form_data.py │ │ ├── content_form.py │ │ ├── load_function_from_url_api_v1_functions_load_url_post_response_200_type_0.py │ │ ├── generate_openai_chat_completion_ollama_v1_chat_completions_post_form_data.py │ │ ├── generate_image_prompt_api_v1_tasks_image_prompt_completions_post_form_data.py │ │ ├── get_user_info_by_session_user_api_v1_users_user_info_get_response_200_type_0.py │ │ ├── add_memory_form.py │ │ ├── update_user_info_by_session_user_api_v1_users_user_info_update_post_form_data.py │ │ ├── search_form.py │ │ ├── get_function_valves_by_id_api_v1_functions_id_id_valves_get_response_200_type_0.py │ │ ├── update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_form_data.py │ │ ├── update_pipeline_valves_api_v1_pipelines_pipeline_id_valves_update_post_form_data.py │ │ ├── get_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_get_response_200_type_0.py │ │ ├── get_tools_valves_spec_by_id_api_v1_tools_id_id_valves_spec_get_response_200_type_0.py │ │ ├── update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_form_data.py │ │ ├── update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_response_200_type_0.py │ │ ├── knowledge_file_id_form.py │ │ ├── update_user_info_by_session_user_api_v1_users_user_info_update_post_response_200_type_0.py │ │ ├── export_config_api_v1_configs_export_get_response_export_config_api_v1_configs_export_get.py │ │ ├── get_function_user_valves_by_id_api_v1_functions_id_id_valves_user_get_response_200_type_0.py │ │ ├── get_function_valves_spec_by_id_api_v1_functions_id_id_valves_spec_get_response_200_type_0.py │ │ ├── update_function_user_valves_by_id_api_v1_functions_id_id_valves_user_update_post_form_data.py │ │ ├── update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_response_200_type_0.py │ │ ├── folder_is_expanded_form.py │ │ ├── get_tools_user_valves_spec_by_id_api_v1_tools_id_id_valves_user_spec_get_response_200_type_0.py │ │ ├── import_config_api_v1_configs_import_post_response_import_config_api_v1_configs_import_post.py │ │ └── update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_response_200_type_0.py │ └── types.py ├── .gitignore ├── exceptions.py └── utils.py ├── .gitattributes ├── CHANGELOG.md ├── .github └── workflows │ └── test.yaml ├── LICENSE └── pyproject.toml /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kbmanager/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/py.typed: -------------------------------------------------------------------------------- 1 | # Marker file for PEP 561 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains methods for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/audio/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/auths/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/channels/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/chats/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/configs/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/default/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/files/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/folders/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/groups/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/images/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/memories/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/models/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/notes/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/ollama/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/openai/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/prompts/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/tasks/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/tools/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/users/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/utils/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/evaluations/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/functions/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/knowledge/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/pipelines/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/api/retrieval/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains endpoint functions for accessing the API""" 2 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/__init__.py: -------------------------------------------------------------------------------- 1 | """A client library for accessing Open WebUI""" 2 | 3 | from .client import AuthenticatedClient, Client 4 | 5 | __all__ = ( 6 | "AuthenticatedClient", 7 | "Client", 8 | ) 9 | -------------------------------------------------------------------------------- /kbmanager/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | build/ 3 | dist/ 4 | *.egg-info/ 5 | .pytest_cache/ 6 | 7 | # pyenv 8 | .python-version 9 | 10 | # Environments 11 | .env 12 | .venv 13 | 14 | # mypy 15 | .mypy_cache/ 16 | .dmypy.json 17 | dmypy.json 18 | 19 | # JetBrains 20 | .idea/ 21 | 22 | /coverage.xml 23 | /.coverage 24 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | 4 | 5 | ## v0.2.0 (2025-08-01) 6 | 7 | ### Bug Fixes 8 | 9 | - Add missing dependency 10 | ([`04b7b48`](https://github.com/dubh3124/OpenWebUI-KB-Manager/commit/04b7b486ea01aeb766feaa130e979237af3d3e9e)) 11 | 12 | 13 | ## v0.1.0 (2025-08-01) 14 | 15 | - Initial Release 16 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/errors.py: -------------------------------------------------------------------------------- 1 | """Contains shared errors types that can be raised from API functions""" 2 | 3 | 4 | class UnexpectedStatus(Exception): 5 | """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" 6 | 7 | def __init__(self, status_code: int, content: bytes): 8 | self.status_code = status_code 9 | self.content = content 10 | 11 | super().__init__( 12 | f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}" 13 | ) 14 | 15 | 16 | __all__ = ["UnexpectedStatus"] 17 | -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | # tests/conftest.py 2 | import pytest 3 | import sys 4 | from pathlib import Path 5 | 6 | # Add the project root to Python path 7 | sys.path.insert(0, str(Path(__file__).parent.parent)) 8 | 9 | 10 | @pytest.fixture 11 | def mock_api_response(): 12 | """Shared fixture for mocking API responses.""" 13 | 14 | class MockResponse: 15 | def __init__(self, status_code=200, content=None, parsed=None): 16 | self.status_code = status_code 17 | self.content = content or b'{"success": true}' 18 | self.parsed = parsed 19 | 20 | def decode(self, *args, **kwargs): 21 | return self.content.decode(*args, **kwargs) 22 | 23 | return MockResponse -------------------------------------------------------------------------------- /kbmanager/exceptions.py: -------------------------------------------------------------------------------- 1 | class KBException(Exception): 2 | """Base exception for the OpenWebUI CLI.""" 3 | 4 | pass 5 | 6 | 7 | class APIError(KBException): 8 | """Raised when an API call returns an error status.""" 9 | 10 | def __init__(self, message: str, status_code: int = None, response_content: str = None): 11 | super().__init__(message) 12 | self.status_code = status_code 13 | self.response_content = response_content 14 | 15 | 16 | class ConfigError(KBException): 17 | """Raised when there's an issue with configuration.""" 18 | 19 | pass 20 | 21 | 22 | class FileOperationError(KBException): 23 | """Raised when a local file operation fails.""" 24 | 25 | pass 26 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | strategy: 13 | matrix: 14 | python-version: ["3.11", "3.12"] 15 | 16 | steps: 17 | - uses: actions/checkout@v3 18 | 19 | - name: Set up Python ${{ matrix.python-version }} 20 | uses: actions/setup-python@v4 21 | with: 22 | python-version: ${{ matrix.python-version }} 23 | 24 | - name: Install uv 25 | run: curl -LsSf https://astral.sh/uv/install.sh | sh 26 | 27 | - name: Install dependencies 28 | run: | 29 | uv venv 30 | uv pip install -e ".[test]" 31 | 32 | - name: Run tests 33 | run: | 34 | uv run pytest --cov=kbmanager --cov-report=xml 35 | 36 | - name: Upload coverage 37 | uses: codecov/codecov-action@v3 38 | with: 39 | file: ./coverage.xml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Herman Haggerty 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/model_params.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ModelParams") 8 | 9 | 10 | @_attrs_define 11 | class ModelParams: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | model_params = cls() 26 | 27 | model_params.additional_properties = d 28 | return model_params 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/chat_form_chat.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChatFormChat") 8 | 9 | 10 | @_attrs_define 11 | class ChatFormChat: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | chat_form_chat = cls() 26 | 27 | chat_form_chat.additional_properties = d 28 | return chat_form_chat 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/event_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="EventFormData") 8 | 9 | 10 | @_attrs_define 11 | class EventFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | event_form_data = cls() 26 | 27 | event_form_data.additional_properties = d 28 | return event_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/chat_response_chat.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChatResponseChat") 8 | 9 | 10 | @_attrs_define 11 | class ChatResponseChat: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | chat_response_chat = cls() 26 | 27 | chat_response_chat.additional_properties = d 28 | return chat_response_chat 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/chat_response_meta.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChatResponseMeta") 8 | 9 | 10 | @_attrs_define 11 | class ChatResponseMeta: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | chat_response_meta = cls() 26 | 27 | chat_response_meta.additional_properties = d 28 | return chat_response_meta 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/note_form_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="NoteFormDataType0") 8 | 9 | 10 | @_attrs_define 11 | class NoteFormDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | note_form_data_type_0 = cls() 26 | 27 | note_form_data_type_0.additional_properties = d 28 | return note_form_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/note_form_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="NoteFormMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class NoteFormMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | note_form_meta_type_0 = cls() 26 | 27 | note_form_meta_type_0.additional_properties = d 28 | return note_form_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/tag_model_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="TagModelMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class TagModelMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | tag_model_meta_type_0 = cls() 26 | 27 | tag_model_meta_type_0.additional_properties = d 28 | return tag_model_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/file_model_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FileModelDataType0") 8 | 9 | 10 | @_attrs_define 11 | class FileModelDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | file_model_data_type_0 = cls() 26 | 27 | file_model_data_type_0.additional_properties = d 28 | return file_model_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/file_model_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FileModelMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class FileModelMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | file_model_meta_type_0 = cls() 26 | 27 | file_model_meta_type_0.additional_properties = d 28 | return file_model_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/note_model_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="NoteModelDataType0") 8 | 9 | 10 | @_attrs_define 11 | class NoteModelDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | note_model_data_type_0 = cls() 26 | 27 | note_model_data_type_0.additional_properties = d 28 | return note_model_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/note_model_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="NoteModelMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class NoteModelMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | note_model_meta_type_0 = cls() 26 | 27 | note_model_meta_type_0.additional_properties = d 28 | return note_model_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/user_model_info_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UserModelInfoType0") 8 | 9 | 10 | @_attrs_define 11 | class UserModelInfoType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | user_model_info_type_0 = cls() 26 | 27 | user_model_info_type_0.additional_properties = d 28 | return user_model_info_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/folder_form_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FolderFormDataType0") 8 | 9 | 10 | @_attrs_define 11 | class FolderFormDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | folder_form_data_type_0 = cls() 26 | 27 | folder_form_data_type_0.additional_properties = d 28 | return folder_form_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/channel_form_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChannelFormDataType0") 8 | 9 | 10 | @_attrs_define 11 | class ChannelFormDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | channel_form_data_type_0 = cls() 26 | 27 | channel_form_data_type_0.additional_properties = d 28 | return channel_form_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/channel_form_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChannelFormMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class ChannelFormMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | channel_form_meta_type_0 = cls() 26 | 27 | channel_form_meta_type_0.additional_properties = d 28 | return channel_form_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/folder_model_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FolderModelDataType0") 8 | 9 | 10 | @_attrs_define 11 | class FolderModelDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | folder_model_data_type_0 = cls() 26 | 27 | folder_model_data_type_0.additional_properties = d 28 | return folder_model_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/folder_model_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FolderModelMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class FolderModelMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | folder_model_meta_type_0 = cls() 26 | 27 | folder_model_meta_type_0.additional_properties = d 28 | return folder_model_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/message_form_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="MessageFormDataType0") 8 | 9 | 10 | @_attrs_define 11 | class MessageFormDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | message_form_data_type_0 = cls() 26 | 27 | message_form_data_type_0.additional_properties = d 28 | return message_form_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/message_form_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="MessageFormMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class MessageFormMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | message_form_meta_type_0 = cls() 26 | 27 | message_form_meta_type_0.additional_properties = d 28 | return message_form_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/channel_model_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChannelModelDataType0") 8 | 9 | 10 | @_attrs_define 11 | class ChannelModelDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | channel_model_data_type_0 = cls() 26 | 27 | channel_model_data_type_0.additional_properties = d 28 | return channel_model_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/channel_model_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChannelModelMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class ChannelModelMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | channel_model_meta_type_0 = cls() 26 | 27 | channel_model_meta_type_0.additional_properties = d 28 | return channel_model_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/feedback_form_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FeedbackFormMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class FeedbackFormMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | feedback_form_meta_type_0 = cls() 26 | 27 | feedback_form_meta_type_0.additional_properties = d 28 | return feedback_form_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/folder_model_items_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FolderModelItemsType0") 8 | 9 | 10 | @_attrs_define 11 | class FolderModelItemsType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | folder_model_items_type_0 = cls() 26 | 27 | folder_model_items_type_0.additional_properties = d 28 | return folder_model_items_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/import_config_form_config.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ImportConfigFormConfig") 8 | 9 | 10 | @_attrs_define 11 | class ImportConfigFormConfig: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | import_config_form_config = cls() 26 | 27 | import_config_form_config.additional_properties = d 28 | return import_config_form_config 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/message_model_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="MessageModelDataType0") 8 | 9 | 10 | @_attrs_define 11 | class MessageModelDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | message_model_data_type_0 = cls() 26 | 27 | message_model_data_type_0.additional_properties = d 28 | return message_model_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/message_model_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="MessageModelMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class MessageModelMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | message_model_meta_type_0 = cls() 26 | 27 | message_model_meta_type_0.additional_properties = d 28 | return message_model_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/snapshot_data_chat_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="SnapshotDataChatType0") 8 | 9 | 10 | @_attrs_define 11 | class SnapshotDataChatType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | snapshot_data_chat_type_0 = cls() 26 | 27 | snapshot_data_chat_type_0.additional_properties = d 28 | return snapshot_data_chat_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/feedback_model_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FeedbackModelDataType0") 8 | 9 | 10 | @_attrs_define 11 | class FeedbackModelDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | feedback_model_data_type_0 = cls() 26 | 27 | feedback_model_data_type_0.additional_properties = d 28 | return feedback_model_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/feedback_model_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FeedbackModelMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class FeedbackModelMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | feedback_model_meta_type_0 = cls() 26 | 27 | feedback_model_meta_type_0.additional_properties = d 28 | return feedback_model_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/group_response_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GroupResponseDataType0") 8 | 9 | 10 | @_attrs_define 11 | class GroupResponseDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | group_response_data_type_0 = cls() 26 | 27 | group_response_data_type_0.additional_properties = d 28 | return group_response_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/group_response_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GroupResponseMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class GroupResponseMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | group_response_meta_type_0 = cls() 26 | 27 | group_response_meta_type_0.additional_properties = d 28 | return group_response_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_form_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeFormDataType0") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeFormDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | knowledge_form_data_type_0 = cls() 26 | 27 | knowledge_form_data_type_0.additional_properties = d 28 | return knowledge_form_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/file_metadata_response_meta.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FileMetadataResponseMeta") 8 | 9 | 10 | @_attrs_define 11 | class FileMetadataResponseMeta: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | file_metadata_response_meta = cls() 26 | 27 | file_metadata_response_meta.additional_properties = d 28 | return file_metadata_response_meta 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/group_form_permissions_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GroupFormPermissionsType0") 8 | 9 | 10 | @_attrs_define 11 | class GroupFormPermissionsType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | group_form_permissions_type_0 = cls() 26 | 27 | group_form_permissions_type_0.additional_properties = d 28 | return group_form_permissions_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/feedback_model_snapshot_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FeedbackModelSnapshotType0") 8 | 9 | 10 | @_attrs_define 11 | class FeedbackModelSnapshotType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | feedback_model_snapshot_type_0 = cls() 26 | 27 | feedback_model_snapshot_type_0.additional_properties = d 28 | return feedback_model_snapshot_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/file_model_response_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FileModelResponseDataType0") 8 | 9 | 10 | @_attrs_define 11 | class FileModelResponseDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | file_model_response_data_type_0 = cls() 26 | 27 | file_model_response_data_type_0.additional_properties = d 28 | return file_model_response_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_response_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeResponseDataType0") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeResponseDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | knowledge_response_data_type_0 = cls() 26 | 27 | knowledge_response_data_type_0.additional_properties = d 28 | return knowledge_response_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_response_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeResponseMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeResponseMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | knowledge_response_meta_type_0 = cls() 26 | 27 | knowledge_response_meta_type_0.additional_properties = d 28 | return knowledge_response_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/model_meta_capabilities_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ModelMetaCapabilitiesType0") 8 | 9 | 10 | @_attrs_define 11 | class ModelMetaCapabilitiesType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | model_meta_capabilities_type_0 = cls() 26 | 27 | model_meta_capabilities_type_0.additional_properties = d 28 | return model_meta_capabilities_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/note_form_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="NoteFormAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class NoteFormAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | note_form_access_control_type_0 = cls() 26 | 27 | note_form_access_control_type_0.additional_properties = d 28 | return note_form_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/tool_form_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ToolFormAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class ToolFormAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | tool_form_access_control_type_0 = cls() 26 | 27 | tool_form_access_control_type_0.additional_properties = d 28 | return tool_form_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/file_model_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FileModelAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class FileModelAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | file_model_access_control_type_0 = cls() 26 | 27 | file_model_access_control_type_0.additional_properties = d 28 | return file_model_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/model_form_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ModelFormAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class ModelFormAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | model_form_access_control_type_0 = cls() 26 | 27 | model_form_access_control_type_0.additional_properties = d 28 | return model_form_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/note_model_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="NoteModelAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class NoteModelAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | note_model_access_control_type_0 = cls() 26 | 27 | note_model_access_control_type_0.additional_properties = d 28 | return note_model_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/tool_model_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ToolModelAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class ToolModelAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | tool_model_access_control_type_0 = cls() 26 | 27 | tool_model_access_control_type_0.additional_properties = d 28 | return tool_model_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/group_response_permissions_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GroupResponsePermissionsType0") 8 | 9 | 10 | @_attrs_define 11 | class GroupResponsePermissionsType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | group_response_permissions_type_0 = cls() 26 | 27 | group_response_permissions_type_0.additional_properties = d 28 | return group_response_permissions_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/message_user_response_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="MessageUserResponseDataType0") 8 | 9 | 10 | @_attrs_define 11 | class MessageUserResponseDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | message_user_response_data_type_0 = cls() 26 | 27 | message_user_response_data_type_0.additional_properties = d 28 | return message_user_response_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/message_user_response_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="MessageUserResponseMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class MessageUserResponseMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | message_user_response_meta_type_0 = cls() 26 | 27 | message_user_response_meta_type_0.additional_properties = d 28 | return message_user_response_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/model_model_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ModelModelAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class ModelModelAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | model_model_access_control_type_0 = cls() 26 | 27 | model_model_access_control_type_0.additional_properties = d 28 | return model_model_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/prompt_form_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="PromptFormAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class PromptFormAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | prompt_form_access_control_type_0 = cls() 26 | 27 | prompt_form_access_control_type_0.additional_properties = d 28 | return prompt_form_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/channel_form_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChannelFormAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class ChannelFormAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | channel_form_access_control_type_0 = cls() 26 | 27 | channel_form_access_control_type_0.additional_properties = d 28 | return channel_form_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_embed_form_options_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateEmbedFormOptionsType0") 8 | 9 | 10 | @_attrs_define 11 | class GenerateEmbedFormOptionsType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_embed_form_options_type_0 = cls() 26 | 27 | generate_embed_form_options_type_0.additional_properties = d 28 | return generate_embed_form_options_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/prompt_model_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="PromptModelAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class PromptModelAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | prompt_model_access_control_type_0 = cls() 26 | 27 | prompt_model_access_control_type_0.additional_properties = d 28 | return prompt_model_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/channel_model_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChannelModelAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class ChannelModelAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | channel_model_access_control_type_0 = cls() 26 | 27 | channel_model_access_control_type_0.additional_properties = d 28 | return channel_model_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/tool_response_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ToolResponseAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class ToolResponseAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | tool_response_access_control_type_0 = cls() 26 | 27 | tool_response_access_control_type_0.additional_properties = d 28 | return tool_response_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/group_update_form_permissions_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GroupUpdateFormPermissionsType0") 8 | 9 | 10 | @_attrs_define 11 | class GroupUpdateFormPermissionsType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | group_update_form_permissions_type_0 = cls() 26 | 27 | group_update_form_permissions_type_0.additional_properties = d 28 | return group_update_form_permissions_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_files_response_data_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeFilesResponseDataType0") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeFilesResponseDataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | knowledge_files_response_data_type_0 = cls() 26 | 27 | knowledge_files_response_data_type_0.additional_properties = d 28 | return knowledge_files_response_data_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_files_response_meta_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeFilesResponseMetaType0") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeFilesResponseMetaType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | knowledge_files_response_meta_type_0 = cls() 26 | 27 | knowledge_files_response_meta_type_0.additional_properties = d 28 | return knowledge_files_response_meta_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_form_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeFormAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeFormAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | knowledge_form_access_control_type_0 = cls() 26 | 27 | knowledge_form_access_control_type_0.additional_properties = d 28 | return knowledge_form_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/model_response_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ModelResponseAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class ModelResponseAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | model_response_access_control_type_0 = cls() 26 | 27 | model_response_access_control_type_0.additional_properties = d 28 | return model_response_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/tool_server_connection_config_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ToolServerConnectionConfigType0") 8 | 9 | 10 | @_attrs_define 11 | class ToolServerConnectionConfigType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | tool_server_connection_config_type_0 = cls() 26 | 27 | tool_server_connection_config_type_0.additional_properties = d 28 | return tool_server_connection_config_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/ollama_config_form_ollama_api_configs.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="OllamaConfigFormOllamaApiConfigs") 8 | 9 | 10 | @_attrs_define 11 | class OllamaConfigFormOllamaApiConfigs: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | ollama_config_form_ollama_api_configs = cls() 26 | 27 | ollama_config_form_ollama_api_configs.additional_properties = d 28 | return ollama_config_form_ollama_api_configs 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/chat_title_messages_form_messages_item.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChatTitleMessagesFormMessagesItem") 8 | 9 | 10 | @_attrs_define 11 | class ChatTitleMessagesFormMessagesItem: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | chat_title_messages_form_messages_item = cls() 26 | 27 | chat_title_messages_form_messages_item.additional_properties = d 28 | return chat_title_messages_form_messages_item 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_completion_form_format_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateCompletionFormFormatType0") 8 | 9 | 10 | @_attrs_define 11 | class GenerateCompletionFormFormatType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_completion_form_format_type_0 = cls() 26 | 27 | generate_completion_form_format_type_0.additional_properties = d 28 | return generate_completion_form_format_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_completion_form_options_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateCompletionFormOptionsType0") 8 | 9 | 10 | @_attrs_define 11 | class GenerateCompletionFormOptionsType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_completion_form_options_type_0 = cls() 26 | 27 | generate_completion_form_options_type_0.additional_properties = d 28 | return generate_completion_form_options_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_embeddings_form_options_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateEmbeddingsFormOptionsType0") 8 | 9 | 10 | @_attrs_define 11 | class GenerateEmbeddingsFormOptionsType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_embeddings_form_options_type_0 = cls() 26 | 27 | generate_embeddings_form_options_type_0.additional_properties = d 28 | return generate_embeddings_form_options_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /tests/test_exceptions.py: -------------------------------------------------------------------------------- 1 | # tests/test_exceptions.py 2 | import pytest 3 | from kbmanager.exceptions import KBException, APIError, ConfigError, FileOperationError 4 | 5 | 6 | class TestExceptions: 7 | def test_kb_exception(self): 8 | """Test base KBException.""" 9 | with pytest.raises(KBException) as exc_info: 10 | raise KBException("Base exception") 11 | assert str(exc_info.value) == "Base exception" 12 | 13 | def test_api_error(self): 14 | """Test APIError with all attributes.""" 15 | error = APIError("API failed", status_code=404, response_content="Not found") 16 | assert str(error) == "API failed" 17 | assert error.status_code == 404 18 | assert error.response_content == "Not found" 19 | 20 | def test_api_error_minimal(self): 21 | """Test APIError with only message.""" 22 | error = APIError("API failed") 23 | assert str(error) == "API failed" 24 | assert error.status_code is None 25 | assert error.response_content is None 26 | 27 | def test_config_error(self): 28 | """Test ConfigError.""" 29 | with pytest.raises(ConfigError) as exc_info: 30 | raise ConfigError("Invalid configuration") 31 | assert str(exc_info.value) == "Invalid configuration" 32 | 33 | def test_file_operation_error(self): 34 | """Test FileOperationError.""" 35 | with pytest.raises(FileOperationError) as exc_info: 36 | raise FileOperationError("File not found") 37 | assert str(exc_info.value) == "File not found" -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/embeddings_api_embeddings_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="EmbeddingsApiEmbeddingsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class EmbeddingsApiEmbeddingsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | embeddings_api_embeddings_post_form_data = cls() 26 | 27 | embeddings_api_embeddings_post_form_data.additional_properties = d 28 | return embeddings_api_embeddings_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_response_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeResponseAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeResponseAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | knowledge_response_access_control_type_0 = cls() 26 | 27 | knowledge_response_access_control_type_0.additional_properties = d 28 | return knowledge_response_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/session_user_response_permissions_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="SessionUserResponsePermissionsType0") 8 | 9 | 10 | @_attrs_define 11 | class SessionUserResponsePermissionsType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | session_user_response_permissions_type_0 = cls() 26 | 27 | session_user_response_permissions_type_0.additional_properties = d 28 | return session_user_response_permissions_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_response_files_type_0_item_type_1.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeResponseFilesType0ItemType1") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeResponseFilesType0ItemType1: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | knowledge_response_files_type_0_item_type_1 = cls() 26 | 27 | knowledge_response_files_type_0_item_type_1.additional_properties = d 28 | return knowledge_response_files_type_0_item_type_1 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/comfy_ui_config_form_comfyuiworkflownodes_item.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ComfyUIConfigFormCOMFYUIWORKFLOWNODESItem") 8 | 9 | 10 | @_attrs_define 11 | class ComfyUIConfigFormCOMFYUIWORKFLOWNODESItem: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | comfy_ui_config_form_comfyuiworkflownodes_item = cls() 26 | 27 | comfy_ui_config_form_comfyuiworkflownodes_item.additional_properties = d 28 | return comfy_ui_config_form_comfyuiworkflownodes_item 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_files_response_access_control_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeFilesResponseAccessControlType0") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeFilesResponseAccessControlType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | knowledge_files_response_access_control_type_0 = cls() 26 | 27 | knowledge_files_response_access_control_type_0.additional_properties = d 28 | return knowledge_files_response_access_control_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/chat_completed_api_chat_completed_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChatCompletedApiChatCompletedPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class ChatCompletedApiChatCompletedPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | chat_completed_api_chat_completed_post_form_data = cls() 26 | 27 | chat_completed_api_chat_completed_post_form_data.additional_properties = d 28 | return chat_completed_api_chat_completed_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/body_upload_file_api_v1_files_post_metadata_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="BodyUploadFileApiV1FilesPostMetadataType0") 8 | 9 | 10 | @_attrs_define 11 | class BodyUploadFileApiV1FilesPostMetadataType0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | body_upload_file_api_v1_files_post_metadata_type_0 = cls() 26 | 27 | body_upload_file_api_v1_files_post_metadata_type_0.additional_properties = d 28 | return body_upload_file_api_v1_files_post_metadata_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/chat_completion_api_chat_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChatCompletionApiChatCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class ChatCompletionApiChatCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | chat_completion_api_chat_completions_post_form_data = cls() 26 | 27 | chat_completion_api_chat_completions_post_form_data.additional_properties = d 28 | return chat_completion_api_chat_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/chat_action_api_chat_actions_action_id_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ChatActionApiChatActionsActionIdPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class ChatActionApiChatActionsActionIdPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | chat_action_api_chat_actions_action_id_post_form_data = cls() 26 | 27 | chat_action_api_chat_actions_action_id_post_form_data.additional_properties = d 28 | return chat_action_api_chat_actions_action_id_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_config_form_evaluationarenamodels_type_0_item.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateConfigFormEVALUATIONARENAMODELSType0Item") 8 | 9 | 10 | @_attrs_define 11 | class UpdateConfigFormEVALUATIONARENAMODELSType0Item: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_config_form_evaluationarenamodels_type_0_item = cls() 26 | 27 | update_config_form_evaluationarenamodels_type_0_item.additional_properties = d 28 | return update_config_form_evaluationarenamodels_type_0_item 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/types.py: -------------------------------------------------------------------------------- 1 | """Contains some shared types for properties""" 2 | 3 | from collections.abc import Mapping, MutableMapping 4 | from http import HTTPStatus 5 | from typing import IO, BinaryIO, Generic, Literal, Optional, TypeVar, Union 6 | 7 | from attrs import define 8 | 9 | 10 | class Unset: 11 | def __bool__(self) -> Literal[False]: 12 | return False 13 | 14 | 15 | UNSET: Unset = Unset() 16 | 17 | # The types that `httpx.Client(files=)` can accept, copied from that library. 18 | FileContent = Union[IO[bytes], bytes, str] 19 | FileTypes = Union[ 20 | # (filename, file (or bytes), content_type) 21 | tuple[Optional[str], FileContent, Optional[str]], 22 | # (filename, file (or bytes), content_type, headers) 23 | tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], 24 | ] 25 | RequestFiles = list[tuple[str, FileTypes]] 26 | 27 | 28 | @define 29 | class File: 30 | """Contains information for file uploads""" 31 | 32 | payload: BinaryIO 33 | file_name: Optional[str] = None 34 | mime_type: Optional[str] = None 35 | 36 | def to_tuple(self) -> FileTypes: 37 | """Return a tuple representation that httpx will accept for multipart/form-data""" 38 | return self.file_name, self.payload, self.mime_type 39 | 40 | 41 | T = TypeVar("T") 42 | 43 | 44 | @define 45 | class Response(Generic[T]): 46 | """A response from an endpoint""" 47 | 48 | status_code: HTTPStatus 49 | content: bytes 50 | headers: MutableMapping[str, str] 51 | parsed: Optional[T] 52 | 53 | 54 | __all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"] 55 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_chat_completion_ollama_api_chat_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateChatCompletionOllamaApiChatPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateChatCompletionOllamaApiChatPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_chat_completion_ollama_api_chat_post_form_data = cls() 26 | 27 | generate_chat_completion_ollama_api_chat_post_form_data.additional_properties = d 28 | return generate_chat_completion_ollama_api_chat_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_emoji_api_v1_tasks_emoji_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateEmojiApiV1TasksEmojiCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateEmojiApiV1TasksEmojiCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_emoji_api_v1_tasks_emoji_completions_post_form_data = cls() 26 | 27 | generate_emoji_api_v1_tasks_emoji_completions_post_form_data.additional_properties = d 28 | return generate_emoji_api_v1_tasks_emoji_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_title_api_v1_tasks_title_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateTitleApiV1TasksTitleCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateTitleApiV1TasksTitleCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_title_api_v1_tasks_title_completions_post_form_data = cls() 26 | 27 | generate_title_api_v1_tasks_title_completions_post_form_data.additional_properties = d 28 | return generate_title_api_v1_tasks_title_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/url_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UrlForm") 8 | 9 | 10 | @_attrs_define 11 | class UrlForm: 12 | """ 13 | Attributes: 14 | url (str): 15 | """ 16 | 17 | url: str 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | url = self.url 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "url": url, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | url = d.pop("url") 37 | 38 | url_form = cls( 39 | url=url, 40 | ) 41 | 42 | url_form.additional_properties = d 43 | return url_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_chat_tags_api_v1_tasks_tags_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateChatTagsApiV1TasksTagsCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateChatTagsApiV1TasksTagsCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_chat_tags_api_v1_tasks_tags_completions_post_form_data = cls() 26 | 27 | generate_chat_tags_api_v1_tasks_tags_completions_post_form_data.additional_properties = d 28 | return generate_chat_tags_api_v1_tasks_tags_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/tag_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="TagForm") 8 | 9 | 10 | @_attrs_define 11 | class TagForm: 12 | """ 13 | Attributes: 14 | name (str): 15 | """ 16 | 17 | name: str 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | name = self.name 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "name": name, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | name = d.pop("name") 37 | 38 | tag_form = cls( 39 | name=name, 40 | ) 41 | 42 | tag_form.additional_properties = d 43 | return tag_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/code_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="CodeForm") 8 | 9 | 10 | @_attrs_define 11 | class CodeForm: 12 | """ 13 | Attributes: 14 | code (str): 15 | """ 16 | 17 | code: str 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | code = self.code 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "code": code, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | code = d.pop("code") 37 | 38 | code_form = cls( 39 | code=code, 40 | ) 41 | 42 | code_form.additional_properties = d 43 | return code_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_chat_completion_openai_chat_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateChatCompletionOpenaiChatCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateChatCompletionOpenaiChatCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_chat_completion_openai_chat_completions_post_form_data = cls() 26 | 27 | generate_chat_completion_openai_chat_completions_post_form_data.additional_properties = d 28 | return generate_chat_completion_openai_chat_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_openai_completion_ollama_v1_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateOpenaiCompletionOllamaV1CompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateOpenaiCompletionOllamaV1CompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_openai_completion_ollama_v1_completions_post_form_data = cls() 26 | 27 | generate_openai_completion_ollama_v1_completions_post_form_data.additional_properties = d 28 | return generate_openai_completion_ollama_v1_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_queries_api_v1_tasks_queries_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateQueriesApiV1TasksQueriesCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateQueriesApiV1TasksQueriesCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_queries_api_v1_tasks_queries_completions_post_form_data = cls() 26 | 27 | generate_queries_api_v1_tasks_queries_completions_post_form_data.additional_properties = d 28 | return generate_queries_api_v1_tasks_queries_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/load_tool_from_url_api_v1_tools_load_url_post_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="LoadToolFromUrlApiV1ToolsLoadUrlPostResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class LoadToolFromUrlApiV1ToolsLoadUrlPostResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | load_tool_from_url_api_v1_tools_load_url_post_response_200_type_0 = cls() 26 | 27 | load_tool_from_url_api_v1_tools_load_url_post_response_200_type_0.additional_properties = d 28 | return load_tool_from_url_api_v1_tools_load_url_post_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_moa_response_api_v1_tasks_moa_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateMoaResponseApiV1TasksMoaCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateMoaResponseApiV1TasksMoaCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_moa_response_api_v1_tasks_moa_completions_post_form_data = cls() 26 | 27 | generate_moa_response_api_v1_tasks_moa_completions_post_form_data.additional_properties = d 28 | return generate_moa_response_api_v1_tasks_moa_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/markdown_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="MarkdownForm") 8 | 9 | 10 | @_attrs_define 11 | class MarkdownForm: 12 | """ 13 | Attributes: 14 | md (str): 15 | """ 16 | 17 | md: str 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | md = self.md 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "md": md, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | md = d.pop("md") 37 | 38 | markdown_form = cls( 39 | md=md, 40 | ) 41 | 42 | markdown_form.additional_properties = d 43 | return markdown_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/load_url_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="LoadUrlForm") 8 | 9 | 10 | @_attrs_define 11 | class LoadUrlForm: 12 | """ 13 | Attributes: 14 | url (str): 15 | """ 16 | 17 | url: str 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | url = self.url 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "url": url, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | url = d.pop("url") 37 | 38 | load_url_form = cls( 39 | url=url, 40 | ) 41 | 42 | load_url_form.additional_properties = d 43 | return load_url_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_autocompletion_api_v1_tasks_auto_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateAutocompletionApiV1TasksAutoCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateAutocompletionApiV1TasksAutoCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_autocompletion_api_v1_tasks_auto_completions_post_form_data = cls() 26 | 27 | generate_autocompletion_api_v1_tasks_auto_completions_post_form_data.additional_properties = d 28 | return generate_autocompletion_api_v1_tasks_auto_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/reaction_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ReactionForm") 8 | 9 | 10 | @_attrs_define 11 | class ReactionForm: 12 | """ 13 | Attributes: 14 | name (str): 15 | """ 16 | 17 | name: str 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | name = self.name 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "name": name, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | name = d.pop("name") 37 | 38 | reaction_form = cls( 39 | name=name, 40 | ) 41 | 42 | reaction_form.additional_properties = d 43 | return reaction_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_follow_ups_api_v1_tasks_follow_up_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateFollowUpsApiV1TasksFollowUpCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateFollowUpsApiV1TasksFollowUpCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_follow_ups_api_v1_tasks_follow_up_completions_post_form_data = cls() 26 | 27 | generate_follow_ups_api_v1_tasks_follow_up_completions_post_form_data.additional_properties = d 28 | return generate_follow_ups_api_v1_tasks_follow_up_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/get_tools_valves_by_id_api_v1_tools_id_id_valves_get_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GetToolsValvesByIdApiV1ToolsIdIdValvesGetResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class GetToolsValvesByIdApiV1ToolsIdIdValvesGetResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | get_tools_valves_by_id_api_v1_tools_id_id_valves_get_response_200_type_0 = cls() 26 | 27 | get_tools_valves_by_id_api_v1_tools_id_id_valves_get_response_200_type_0.additional_properties = d 28 | return get_tools_valves_by_id_api_v1_tools_id_id_valves_get_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateToolsValvesByIdApiV1ToolsIdIdValvesUpdatePostFormData") 8 | 9 | 10 | @_attrs_define 11 | class UpdateToolsValvesByIdApiV1ToolsIdIdValvesUpdatePostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_form_data = cls() 26 | 27 | update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_form_data.additional_properties = d 28 | return update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/content_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ContentForm") 8 | 9 | 10 | @_attrs_define 11 | class ContentForm: 12 | """ 13 | Attributes: 14 | content (str): 15 | """ 16 | 17 | content: str 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | content = self.content 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "content": content, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | content = d.pop("content") 37 | 38 | content_form = cls( 39 | content=content, 40 | ) 41 | 42 | content_form.additional_properties = d 43 | return content_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/load_function_from_url_api_v1_functions_load_url_post_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="LoadFunctionFromUrlApiV1FunctionsLoadUrlPostResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class LoadFunctionFromUrlApiV1FunctionsLoadUrlPostResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | load_function_from_url_api_v1_functions_load_url_post_response_200_type_0 = cls() 26 | 27 | load_function_from_url_api_v1_functions_load_url_post_response_200_type_0.additional_properties = d 28 | return load_function_from_url_api_v1_functions_load_url_post_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_openai_chat_completion_ollama_v1_chat_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateOpenaiChatCompletionOllamaV1ChatCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateOpenaiChatCompletionOllamaV1ChatCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_openai_chat_completion_ollama_v1_chat_completions_post_form_data = cls() 26 | 27 | generate_openai_chat_completion_ollama_v1_chat_completions_post_form_data.additional_properties = d 28 | return generate_openai_chat_completion_ollama_v1_chat_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/generate_image_prompt_api_v1_tasks_image_prompt_completions_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GenerateImagePromptApiV1TasksImagePromptCompletionsPostFormData") 8 | 9 | 10 | @_attrs_define 11 | class GenerateImagePromptApiV1TasksImagePromptCompletionsPostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | generate_image_prompt_api_v1_tasks_image_prompt_completions_post_form_data = cls() 26 | 27 | generate_image_prompt_api_v1_tasks_image_prompt_completions_post_form_data.additional_properties = d 28 | return generate_image_prompt_api_v1_tasks_image_prompt_completions_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/get_user_info_by_session_user_api_v1_users_user_info_get_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GetUserInfoBySessionUserApiV1UsersUserInfoGetResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class GetUserInfoBySessionUserApiV1UsersUserInfoGetResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | get_user_info_by_session_user_api_v1_users_user_info_get_response_200_type_0 = cls() 26 | 27 | get_user_info_by_session_user_api_v1_users_user_info_get_response_200_type_0.additional_properties = d 28 | return get_user_info_by_session_user_api_v1_users_user_info_get_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/add_memory_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="AddMemoryForm") 8 | 9 | 10 | @_attrs_define 11 | class AddMemoryForm: 12 | """ 13 | Attributes: 14 | content (str): 15 | """ 16 | 17 | content: str 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | content = self.content 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "content": content, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | content = d.pop("content") 37 | 38 | add_memory_form = cls( 39 | content=content, 40 | ) 41 | 42 | add_memory_form.additional_properties = d 43 | return add_memory_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_user_info_by_session_user_api_v1_users_user_info_update_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateUserInfoBySessionUserApiV1UsersUserInfoUpdatePostFormData") 8 | 9 | 10 | @_attrs_define 11 | class UpdateUserInfoBySessionUserApiV1UsersUserInfoUpdatePostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_user_info_by_session_user_api_v1_users_user_info_update_post_form_data = cls() 26 | 27 | update_user_info_by_session_user_api_v1_users_user_info_update_post_form_data.additional_properties = d 28 | return update_user_info_by_session_user_api_v1_users_user_info_update_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/search_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar, cast 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="SearchForm") 8 | 9 | 10 | @_attrs_define 11 | class SearchForm: 12 | """ 13 | Attributes: 14 | queries (list[str]): 15 | """ 16 | 17 | queries: list[str] 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | queries = self.queries 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "queries": queries, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | queries = cast(list[str], d.pop("queries")) 37 | 38 | search_form = cls( 39 | queries=queries, 40 | ) 41 | 42 | search_form.additional_properties = d 43 | return search_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/get_function_valves_by_id_api_v1_functions_id_id_valves_get_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GetFunctionValvesByIdApiV1FunctionsIdIdValvesGetResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class GetFunctionValvesByIdApiV1FunctionsIdIdValvesGetResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | get_function_valves_by_id_api_v1_functions_id_id_valves_get_response_200_type_0 = cls() 26 | 27 | get_function_valves_by_id_api_v1_functions_id_id_valves_get_response_200_type_0.additional_properties = d 28 | return get_function_valves_by_id_api_v1_functions_id_id_valves_get_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateFunctionValvesByIdApiV1FunctionsIdIdValvesUpdatePostFormData") 8 | 9 | 10 | @_attrs_define 11 | class UpdateFunctionValvesByIdApiV1FunctionsIdIdValvesUpdatePostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_form_data = cls() 26 | 27 | update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_form_data.additional_properties = d 28 | return update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_pipeline_valves_api_v1_pipelines_pipeline_id_valves_update_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdatePipelineValvesApiV1PipelinesPipelineIdValvesUpdatePostFormData") 8 | 9 | 10 | @_attrs_define 11 | class UpdatePipelineValvesApiV1PipelinesPipelineIdValvesUpdatePostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_pipeline_valves_api_v1_pipelines_pipeline_id_valves_update_post_form_data = cls() 26 | 27 | update_pipeline_valves_api_v1_pipelines_pipeline_id_valves_update_post_form_data.additional_properties = d 28 | return update_pipeline_valves_api_v1_pipelines_pipeline_id_valves_update_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/get_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_get_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GetToolsUserValvesByIdApiV1ToolsIdIdValvesUserGetResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class GetToolsUserValvesByIdApiV1ToolsIdIdValvesUserGetResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | get_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_get_response_200_type_0 = cls() 26 | 27 | get_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_get_response_200_type_0.additional_properties = d 28 | return get_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_get_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/get_tools_valves_spec_by_id_api_v1_tools_id_id_valves_spec_get_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GetToolsValvesSpecByIdApiV1ToolsIdIdValvesSpecGetResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class GetToolsValvesSpecByIdApiV1ToolsIdIdValvesSpecGetResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | get_tools_valves_spec_by_id_api_v1_tools_id_id_valves_spec_get_response_200_type_0 = cls() 26 | 27 | get_tools_valves_spec_by_id_api_v1_tools_id_id_valves_spec_get_response_200_type_0.additional_properties = d 28 | return get_tools_valves_spec_by_id_api_v1_tools_id_id_valves_spec_get_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "kb-manager" 3 | version = "0.2.0" 4 | description = "A CLI tool for managing files and knowledge bases in OpenWebUI." 5 | authors = [{ name = "Herman Haggerty", email = "herman.haggerty@hemrantech.com" }] 6 | dependencies = [ 7 | "click", 8 | "httpx", 9 | "pyyaml", 10 | "tqdm", 11 | "pathspec", 12 | "requests>=2.32.4", 13 | "attrs>=25.3.0", 14 | ] 15 | requires-python = ">=3.11" 16 | 17 | [project.optional-dependencies] 18 | dev = [ 19 | "pytest>=7.4.0", 20 | "pytest-asyncio>=0.21.0", 21 | "pytest-cov>=4.1.0", 22 | "pytest-mock>=3.11.0", 23 | "ruff>=0.1.0", 24 | "mypy>=1.5.0", 25 | "python-semantic-release>=10.2.0", 26 | "openapi-python-client>=0.25.3" 27 | ] 28 | 29 | [project.scripts] 30 | kb-manager = "kbmanager.main:cli" 31 | 32 | [build-system] 33 | requires = ["setuptools>=61.0"] 34 | build-backend = "setuptools.build_meta" 35 | 36 | [tool.pytest.ini_options] 37 | testpaths = ["tests"] 38 | python_files = ["test_*.py"] 39 | python_functions = ["test_*"] 40 | asyncio_mode = "auto" 41 | 42 | [tool.coverage.run] 43 | source = ["kbmanager"] 44 | omit = ["*/tests/*", "*/open_web_ui_client/*"] 45 | 46 | [tool.coverage.report] 47 | show_missing = true 48 | skip_covered = false 49 | 50 | [tool.semantic_release] 51 | # Version will be read from pyproject.toml [project] section 52 | version_source = "toml" 53 | version_toml = ["pyproject.toml:project.version"] 54 | # Enable changelog generation 55 | changelog_file = "CHANGELOG.md" 56 | # Enable GitHub Release 57 | upload_to_release = true 58 | # Build the package as part of the release 59 | build_command = "pip install build && python -m build" 60 | 61 | [tool.semantic_release.branches.main] 62 | match = "^(main)$" 63 | prerelease = false 64 | prerelease_token = "rc" 65 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateToolsUserValvesByIdApiV1ToolsIdIdValvesUserUpdatePostFormData") 8 | 9 | 10 | @_attrs_define 11 | class UpdateToolsUserValvesByIdApiV1ToolsIdIdValvesUserUpdatePostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_form_data = cls() 26 | 27 | update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_form_data.additional_properties = d 28 | return update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateToolsValvesByIdApiV1ToolsIdIdValvesUpdatePostResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class UpdateToolsValvesByIdApiV1ToolsIdIdValvesUpdatePostResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_response_200_type_0 = cls() 26 | 27 | update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_response_200_type_0.additional_properties = d 28 | return update_tools_valves_by_id_api_v1_tools_id_id_valves_update_post_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/knowledge_file_id_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="KnowledgeFileIdForm") 8 | 9 | 10 | @_attrs_define 11 | class KnowledgeFileIdForm: 12 | """ 13 | Attributes: 14 | file_id (str): 15 | """ 16 | 17 | file_id: str 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | file_id = self.file_id 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "file_id": file_id, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | file_id = d.pop("file_id") 37 | 38 | knowledge_file_id_form = cls( 39 | file_id=file_id, 40 | ) 41 | 42 | knowledge_file_id_form.additional_properties = d 43 | return knowledge_file_id_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_user_info_by_session_user_api_v1_users_user_info_update_post_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateUserInfoBySessionUserApiV1UsersUserInfoUpdatePostResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class UpdateUserInfoBySessionUserApiV1UsersUserInfoUpdatePostResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_user_info_by_session_user_api_v1_users_user_info_update_post_response_200_type_0 = cls() 26 | 27 | update_user_info_by_session_user_api_v1_users_user_info_update_post_response_200_type_0.additional_properties = d 28 | return update_user_info_by_session_user_api_v1_users_user_info_update_post_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/export_config_api_v1_configs_export_get_response_export_config_api_v1_configs_export_get.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ExportConfigApiV1ConfigsExportGetResponseExportConfigApiV1ConfigsExportGet") 8 | 9 | 10 | @_attrs_define 11 | class ExportConfigApiV1ConfigsExportGetResponseExportConfigApiV1ConfigsExportGet: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | export_config_api_v1_configs_export_get_response_export_config_api_v1_configs_export_get = cls() 26 | 27 | export_config_api_v1_configs_export_get_response_export_config_api_v1_configs_export_get.additional_properties = d 28 | return export_config_api_v1_configs_export_get_response_export_config_api_v1_configs_export_get 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/get_function_user_valves_by_id_api_v1_functions_id_id_valves_user_get_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GetFunctionUserValvesByIdApiV1FunctionsIdIdValvesUserGetResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class GetFunctionUserValvesByIdApiV1FunctionsIdIdValvesUserGetResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | get_function_user_valves_by_id_api_v1_functions_id_id_valves_user_get_response_200_type_0 = cls() 26 | 27 | get_function_user_valves_by_id_api_v1_functions_id_id_valves_user_get_response_200_type_0.additional_properties = d 28 | return get_function_user_valves_by_id_api_v1_functions_id_id_valves_user_get_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/get_function_valves_spec_by_id_api_v1_functions_id_id_valves_spec_get_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GetFunctionValvesSpecByIdApiV1FunctionsIdIdValvesSpecGetResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class GetFunctionValvesSpecByIdApiV1FunctionsIdIdValvesSpecGetResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | get_function_valves_spec_by_id_api_v1_functions_id_id_valves_spec_get_response_200_type_0 = cls() 26 | 27 | get_function_valves_spec_by_id_api_v1_functions_id_id_valves_spec_get_response_200_type_0.additional_properties = d 28 | return get_function_valves_spec_by_id_api_v1_functions_id_id_valves_spec_get_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_function_user_valves_by_id_api_v1_functions_id_id_valves_user_update_post_form_data.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateFunctionUserValvesByIdApiV1FunctionsIdIdValvesUserUpdatePostFormData") 8 | 9 | 10 | @_attrs_define 11 | class UpdateFunctionUserValvesByIdApiV1FunctionsIdIdValvesUserUpdatePostFormData: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_function_user_valves_by_id_api_v1_functions_id_id_valves_user_update_post_form_data = cls() 26 | 27 | update_function_user_valves_by_id_api_v1_functions_id_id_valves_user_update_post_form_data.additional_properties = d 28 | return update_function_user_valves_by_id_api_v1_functions_id_id_valves_user_update_post_form_data 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateFunctionValvesByIdApiV1FunctionsIdIdValvesUpdatePostResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class UpdateFunctionValvesByIdApiV1FunctionsIdIdValvesUpdatePostResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_response_200_type_0 = cls() 26 | 27 | update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_response_200_type_0.additional_properties = d 28 | return update_function_valves_by_id_api_v1_functions_id_id_valves_update_post_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/folder_is_expanded_form.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="FolderIsExpandedForm") 8 | 9 | 10 | @_attrs_define 11 | class FolderIsExpandedForm: 12 | """ 13 | Attributes: 14 | is_expanded (bool): 15 | """ 16 | 17 | is_expanded: bool 18 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 19 | 20 | def to_dict(self) -> dict[str, Any]: 21 | is_expanded = self.is_expanded 22 | 23 | field_dict: dict[str, Any] = {} 24 | field_dict.update(self.additional_properties) 25 | field_dict.update( 26 | { 27 | "is_expanded": is_expanded, 28 | } 29 | ) 30 | 31 | return field_dict 32 | 33 | @classmethod 34 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 35 | d = dict(src_dict) 36 | is_expanded = d.pop("is_expanded") 37 | 38 | folder_is_expanded_form = cls( 39 | is_expanded=is_expanded, 40 | ) 41 | 42 | folder_is_expanded_form.additional_properties = d 43 | return folder_is_expanded_form 44 | 45 | @property 46 | def additional_keys(self) -> list[str]: 47 | return list(self.additional_properties.keys()) 48 | 49 | def __getitem__(self, key: str) -> Any: 50 | return self.additional_properties[key] 51 | 52 | def __setitem__(self, key: str, value: Any) -> None: 53 | self.additional_properties[key] = value 54 | 55 | def __delitem__(self, key: str) -> None: 56 | del self.additional_properties[key] 57 | 58 | def __contains__(self, key: str) -> bool: 59 | return key in self.additional_properties 60 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/get_tools_user_valves_spec_by_id_api_v1_tools_id_id_valves_user_spec_get_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="GetToolsUserValvesSpecByIdApiV1ToolsIdIdValvesUserSpecGetResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class GetToolsUserValvesSpecByIdApiV1ToolsIdIdValvesUserSpecGetResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | get_tools_user_valves_spec_by_id_api_v1_tools_id_id_valves_user_spec_get_response_200_type_0 = cls() 26 | 27 | get_tools_user_valves_spec_by_id_api_v1_tools_id_id_valves_user_spec_get_response_200_type_0.additional_properties = d 28 | return get_tools_user_valves_spec_by_id_api_v1_tools_id_id_valves_user_spec_get_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/import_config_api_v1_configs_import_post_response_import_config_api_v1_configs_import_post.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="ImportConfigApiV1ConfigsImportPostResponseImportConfigApiV1ConfigsImportPost") 8 | 9 | 10 | @_attrs_define 11 | class ImportConfigApiV1ConfigsImportPostResponseImportConfigApiV1ConfigsImportPost: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | import_config_api_v1_configs_import_post_response_import_config_api_v1_configs_import_post = cls() 26 | 27 | import_config_api_v1_configs_import_post_response_import_config_api_v1_configs_import_post.additional_properties = d 28 | return import_config_api_v1_configs_import_post_response_import_config_api_v1_configs_import_post 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/open_web_ui_client/models/update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_response_200_type_0.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from typing import Any, TypeVar 3 | 4 | from attrs import define as _attrs_define 5 | from attrs import field as _attrs_field 6 | 7 | T = TypeVar("T", bound="UpdateToolsUserValvesByIdApiV1ToolsIdIdValvesUserUpdatePostResponse200Type0") 8 | 9 | 10 | @_attrs_define 11 | class UpdateToolsUserValvesByIdApiV1ToolsIdIdValvesUserUpdatePostResponse200Type0: 12 | """ """ 13 | 14 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 15 | 16 | def to_dict(self) -> dict[str, Any]: 17 | field_dict: dict[str, Any] = {} 18 | field_dict.update(self.additional_properties) 19 | 20 | return field_dict 21 | 22 | @classmethod 23 | def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 24 | d = dict(src_dict) 25 | update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_response_200_type_0 = cls() 26 | 27 | update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_response_200_type_0.additional_properties = d 28 | return update_tools_user_valves_by_id_api_v1_tools_id_id_valves_user_update_post_response_200_type_0 29 | 30 | @property 31 | def additional_keys(self) -> list[str]: 32 | return list(self.additional_properties.keys()) 33 | 34 | def __getitem__(self, key: str) -> Any: 35 | return self.additional_properties[key] 36 | 37 | def __setitem__(self, key: str, value: Any) -> None: 38 | self.additional_properties[key] = value 39 | 40 | def __delitem__(self, key: str) -> None: 41 | del self.additional_properties[key] 42 | 43 | def __contains__(self, key: str) -> bool: 44 | return key in self.additional_properties 45 | -------------------------------------------------------------------------------- /kbmanager/utils.py: -------------------------------------------------------------------------------- 1 | # kbmanager/utils.py 2 | import logging 3 | import sys 4 | 5 | logger = logging.getLogger(__name__) 6 | 7 | 8 | def get_authenticated_client_class(): 9 | """Dynamically imports and returns AuthenticatedClient.""" 10 | try: 11 | from kbmanager.open_web_ui_client.client import AuthenticatedClient 12 | 13 | return AuthenticatedClient 14 | except ModuleNotFoundError as e: 15 | logger.error(f"Error importing API client: {e}. The 'open_web_ui_client' module might be missing.") 16 | click.echo("Error: The 'open_web_ui_client' module is missing. It needs to be generated.") 17 | click.echo("Please run 'kb-manager setup' to generate the API client.") 18 | sys.exit(1) # Exit if client not found 19 | 20 | 21 | def get_actual_client_instance(config_manager): 22 | """ 23 | Returns an instance of AuthenticatedClient using configuration. 24 | Raises ConfigError or RuntimeError if configuration is missing or client cannot be initialized. 25 | """ 26 | AuthenticatedClient = get_authenticated_client_class() 27 | try: 28 | # Ensure config_manager has loaded config before accessing properties 29 | if not config_manager.get("api_key") or not config_manager.get("base_url"): 30 | raise ConfigError( 31 | "API key or base URL is missing. Please ensure configuration is loaded or run 'kb-manager setup'." 32 | ) 33 | 34 | return AuthenticatedClient(base_url=config_manager.base_url, token=config_manager.api_key) 35 | except ConfigError as e: 36 | logger.error(f"Configuration error during client initialization: {e}") 37 | raise 38 | except Exception as e: 39 | logger.error(f"An unexpected error occurred during API client instantiation: {e}") 40 | raise RuntimeError(f"Failed to initialize API client: {e}") 41 | --------------------------------------------------------------------------------