From a7ec816a215ce994de1669f9bacc9911158986cf Mon Sep 17 00:00:00 2001 From: everos-sdk-factory Date: Wed, 29 Jul 2026 07:58:45 +0000 Subject: [PATCH] chore(sdk): generate 1.0.0-rc1 from contract 2.0.0 Sources: memory-engine@release-20260709_v10 multimodal-storage@release-20260729_v1 --- .openapi-generator-ignore | 36 + .openapi-generator/FILES | 198 ++ .openapi-generator/VERSION | 1 + docs/AddData.md | 30 + docs/AddInput.md | 34 + docs/AddOperation.md | 33 + docs/AgentCaseItem.md | 38 + docs/AgentSkillItem.md | 38 + docs/AtomicFactItem.md | 31 + docs/Content.md | 28 + docs/ContentItem.md | 38 + docs/Data.md | 31 + docs/Data1.md | 31 + docs/DeleteData.md | 31 + docs/DeleteInput.md | 33 + docs/DeleteOperation.md | 33 + docs/EditData.md | 34 + docs/EditInput.md | 34 + docs/EditInputOperationsInner.md | 33 + docs/EditResultItem.md | 36 + docs/Envelope.md | 33 + docs/EnvelopeResult.md | 29 + docs/EpisodeItem.md | 40 + docs/ExplicitInfoData.md | 31 + docs/ExplicitInfoPatch.md | 31 + docs/FilterNode.md | 31 + docs/FlushData.md | 29 + docs/FlushInput.md | 31 + docs/GetData.md | 34 + docs/GetInput.md | 38 + docs/HTTPValidationError.md | 29 + docs/ImplicitTraitData.md | 31 + docs/ImplicitTraitPatch.md | 31 + docs/MemoryApi.md | 507 +++ docs/MessageItem.md | 36 + docs/ProfileItem.md | 33 + docs/SearchAgentCaseItem.md | 39 + docs/SearchAgentSkillItem.md | 39 + docs/SearchAtomicFactItem.md | 31 + docs/SearchData.md | 33 + docs/SearchEpisodeItem.md | 41 + docs/SearchInput.md | 40 + docs/SearchProfileItem.md | 34 + docs/SignEnvelope.md | 33 + docs/SignEnvelopeAllOfResult.md | 29 + docs/SignObjectItem.md | 31 + docs/SignRequest.md | 29 + docs/SignResponse.md | 29 + docs/SignResponseItem.md | 34 + docs/SignedInfo.md | 32 + docs/StorageApi.md | 90 + docs/SuccessEnvelopeAddData.md | 30 + docs/SuccessEnvelopeDeleteData.md | 30 + docs/SuccessEnvelopeEditData.md | 30 + docs/SuccessEnvelopeFlushData.md | 30 + docs/SuccessEnvelopeGetData.md | 30 + docs/SuccessEnvelopeSearchData.md | 30 + docs/ToolCall.md | 31 + docs/ToolCallFunction.md | 30 + docs/UnprocessedMessageDTO.md | 40 + docs/UpdateOperation.md | 34 + docs/ValidationError.md | 31 + docs/ValidationErrorLocInner.md | 28 + everos_cloud/__init__.py | 93 + everos_cloud/api/__init__.py | 6 + everos_cloud/api/memory_api.py | 1767 +++++++++++ everos_cloud/api/storage_api.py | 321 ++ everos_cloud/api_client.py | 798 +++++ everos_cloud/api_response.py | 21 + everos_cloud/configuration.py | 575 ++++ everos_cloud/exceptions.py | 200 ++ everos_cloud/models/__init__.py | 75 + everos_cloud/models/add_data.py | 110 + everos_cloud/models/add_input.py | 130 + everos_cloud/models/add_operation.py | 131 + everos_cloud/models/agent_case_item.py | 125 + everos_cloud/models/agent_skill_item.py | 119 + everos_cloud/models/atomic_fact_item.py | 103 + everos_cloud/models/content.py | 140 + everos_cloud/models/content_item.py | 164 + everos_cloud/models/data.py | 135 + everos_cloud/models/data1.py | 135 + everos_cloud/models/delete_data.py | 103 + everos_cloud/models/delete_input.py | 125 + everos_cloud/models/delete_operation.py | 127 + everos_cloud/models/edit_data.py | 117 + everos_cloud/models/edit_input.py | 128 + .../models/edit_input_operations_inner.py | 190 ++ everos_cloud/models/edit_result_item.py | 135 + everos_cloud/models/envelope.py | 111 + everos_cloud/models/envelope_result.py | 106 + everos_cloud/models/episode_item.py | 142 + everos_cloud/models/explicit_info_data.py | 104 + everos_cloud/models/explicit_info_patch.py | 114 + everos_cloud/models/filter_node.py | 129 + everos_cloud/models/flush_data.py | 108 + everos_cloud/models/flush_input.py | 106 + everos_cloud/models/get_data.py | 143 + everos_cloud/models/get_input.py | 166 + everos_cloud/models/http_validation_error.py | 109 + everos_cloud/models/implicit_trait_data.py | 104 + everos_cloud/models/implicit_trait_patch.py | 114 + everos_cloud/models/message_item.py | 147 + everos_cloud/models/profile_item.py | 109 + everos_cloud/models/search_agent_case_item.py | 127 + .../models/search_agent_skill_item.py | 121 + .../models/search_atomic_fact_item.py | 105 + everos_cloud/models/search_data.py | 149 + everos_cloud/models/search_episode_item.py | 144 + everos_cloud/models/search_input.py | 163 + everos_cloud/models/search_profile_item.py | 116 + everos_cloud/models/sign_envelope.py | 111 + .../models/sign_envelope_all_of_result.py | 105 + everos_cloud/models/sign_object_item.py | 112 + everos_cloud/models/sign_request.py | 110 + everos_cloud/models/sign_response.py | 109 + everos_cloud/models/sign_response_item.py | 115 + everos_cloud/models/signed_info.py | 105 + .../models/success_envelope_add_data.py | 107 + .../models/success_envelope_delete_data.py | 107 + .../models/success_envelope_edit_data.py | 107 + .../models/success_envelope_flush_data.py | 107 + .../models/success_envelope_get_data.py | 107 + .../models/success_envelope_search_data.py | 107 + everos_cloud/models/tool_call.py | 109 + everos_cloud/models/tool_call_function.py | 103 + .../models/unprocessed_message_dto.py | 156 + everos_cloud/models/update_operation.py | 133 + everos_cloud/models/validation_error.py | 113 + .../models/validation_error_loc_inner.py | 139 + everos_cloud/py.typed | 0 everos_cloud/rest.py | 258 ++ openapi.json | 2787 +++++++++++++++++ pyproject.toml | 89 + requirements.txt | 4 + setup.cfg | 2 + setup.py | 51 + test-requirements.txt | 6 + test/__init__.py | 0 test/test_add_data.py | 55 + test/test_add_input.py | 91 + test/test_add_operation.py | 58 + test/test_agent_case_item.py | 70 + test/test_agent_skill_item.py | 72 + test/test_atomic_fact_item.py | 55 + test/test_content.py | 51 + test/test_content_item.py | 61 + test/test_data.py | 57 + test/test_data1.py | 54 + test/test_delete_data.py | 55 + test/test_delete_input.py | 56 + test/test_delete_operation.py | 58 + test/test_edit_data.py | 68 + test/test_edit_input.py | 62 + test/test_edit_input_operations_inner.py | 60 + test/test_edit_result_item.py | 62 + test/test_envelope.py | 56 + test/test_envelope_result.py | 52 + test/test_episode_item.py | 77 + test/test_explicit_info_data.py | 55 + test/test_explicit_info_patch.py | 53 + test/test_filter_node.py | 57 + test/test_flush_data.py | 53 + test/test_flush_input.py | 55 + test/test_get_data.py | 110 + test/test_get_input.py | 62 + test/test_http_validation_error.py | 59 + test/test_implicit_trait_data.py | 55 + test/test_implicit_trait_patch.py | 53 + test/test_memory_api.py | 74 + test/test_message_item.py | 69 + test/test_profile_item.py | 60 + test/test_search_agent_case_item.py | 72 + test/test_search_agent_skill_item.py | 74 + test/test_search_atomic_fact_item.py | 57 + test/test_search_data.py | 134 + test/test_search_episode_item.py | 80 + test/test_search_input.py | 64 + test/test_search_profile_item.py | 61 + test/test_sign_envelope.py | 70 + test/test_sign_envelope_all_of_result.py | 66 + test/test_sign_object_item.py | 57 + test/test_sign_request.py | 63 + test/test_sign_response.py | 65 + test/test_sign_response_item.py | 62 + test/test_signed_info.py | 56 + test/test_storage_api.py | 39 + test/test_success_envelope_add_data.py | 59 + test/test_success_envelope_delete_data.py | 63 + test/test_success_envelope_edit_data.py | 83 + test/test_success_envelope_flush_data.py | 57 + test/test_success_envelope_get_data.py | 173 + test/test_success_envelope_search_data.py | 221 ++ test/test_tool_call.py | 60 + test/test_tool_call_function.py | 55 + test/test_unprocessed_message_dto.py | 77 + test/test_update_operation.py | 60 + test/test_validation_error.py | 61 + test/test_validation_error_loc_inner.py | 51 + tox.ini | 9 + 200 files changed, 20996 insertions(+) create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .openapi-generator/VERSION create mode 100644 docs/AddData.md create mode 100644 docs/AddInput.md create mode 100644 docs/AddOperation.md create mode 100644 docs/AgentCaseItem.md create mode 100644 docs/AgentSkillItem.md create mode 100644 docs/AtomicFactItem.md create mode 100644 docs/Content.md create mode 100644 docs/ContentItem.md create mode 100644 docs/Data.md create mode 100644 docs/Data1.md create mode 100644 docs/DeleteData.md create mode 100644 docs/DeleteInput.md create mode 100644 docs/DeleteOperation.md create mode 100644 docs/EditData.md create mode 100644 docs/EditInput.md create mode 100644 docs/EditInputOperationsInner.md create mode 100644 docs/EditResultItem.md create mode 100644 docs/Envelope.md create mode 100644 docs/EnvelopeResult.md create mode 100644 docs/EpisodeItem.md create mode 100644 docs/ExplicitInfoData.md create mode 100644 docs/ExplicitInfoPatch.md create mode 100644 docs/FilterNode.md create mode 100644 docs/FlushData.md create mode 100644 docs/FlushInput.md create mode 100644 docs/GetData.md create mode 100644 docs/GetInput.md create mode 100644 docs/HTTPValidationError.md create mode 100644 docs/ImplicitTraitData.md create mode 100644 docs/ImplicitTraitPatch.md create mode 100644 docs/MemoryApi.md create mode 100644 docs/MessageItem.md create mode 100644 docs/ProfileItem.md create mode 100644 docs/SearchAgentCaseItem.md create mode 100644 docs/SearchAgentSkillItem.md create mode 100644 docs/SearchAtomicFactItem.md create mode 100644 docs/SearchData.md create mode 100644 docs/SearchEpisodeItem.md create mode 100644 docs/SearchInput.md create mode 100644 docs/SearchProfileItem.md create mode 100644 docs/SignEnvelope.md create mode 100644 docs/SignEnvelopeAllOfResult.md create mode 100644 docs/SignObjectItem.md create mode 100644 docs/SignRequest.md create mode 100644 docs/SignResponse.md create mode 100644 docs/SignResponseItem.md create mode 100644 docs/SignedInfo.md create mode 100644 docs/StorageApi.md create mode 100644 docs/SuccessEnvelopeAddData.md create mode 100644 docs/SuccessEnvelopeDeleteData.md create mode 100644 docs/SuccessEnvelopeEditData.md create mode 100644 docs/SuccessEnvelopeFlushData.md create mode 100644 docs/SuccessEnvelopeGetData.md create mode 100644 docs/SuccessEnvelopeSearchData.md create mode 100644 docs/ToolCall.md create mode 100644 docs/ToolCallFunction.md create mode 100644 docs/UnprocessedMessageDTO.md create mode 100644 docs/UpdateOperation.md create mode 100644 docs/ValidationError.md create mode 100644 docs/ValidationErrorLocInner.md create mode 100644 everos_cloud/__init__.py create mode 100644 everos_cloud/api/__init__.py create mode 100644 everos_cloud/api/memory_api.py create mode 100644 everos_cloud/api/storage_api.py create mode 100644 everos_cloud/api_client.py create mode 100644 everos_cloud/api_response.py create mode 100644 everos_cloud/configuration.py create mode 100644 everos_cloud/exceptions.py create mode 100644 everos_cloud/models/__init__.py create mode 100644 everos_cloud/models/add_data.py create mode 100644 everos_cloud/models/add_input.py create mode 100644 everos_cloud/models/add_operation.py create mode 100644 everos_cloud/models/agent_case_item.py create mode 100644 everos_cloud/models/agent_skill_item.py create mode 100644 everos_cloud/models/atomic_fact_item.py create mode 100644 everos_cloud/models/content.py create mode 100644 everos_cloud/models/content_item.py create mode 100644 everos_cloud/models/data.py create mode 100644 everos_cloud/models/data1.py create mode 100644 everos_cloud/models/delete_data.py create mode 100644 everos_cloud/models/delete_input.py create mode 100644 everos_cloud/models/delete_operation.py create mode 100644 everos_cloud/models/edit_data.py create mode 100644 everos_cloud/models/edit_input.py create mode 100644 everos_cloud/models/edit_input_operations_inner.py create mode 100644 everos_cloud/models/edit_result_item.py create mode 100644 everos_cloud/models/envelope.py create mode 100644 everos_cloud/models/envelope_result.py create mode 100644 everos_cloud/models/episode_item.py create mode 100644 everos_cloud/models/explicit_info_data.py create mode 100644 everos_cloud/models/explicit_info_patch.py create mode 100644 everos_cloud/models/filter_node.py create mode 100644 everos_cloud/models/flush_data.py create mode 100644 everos_cloud/models/flush_input.py create mode 100644 everos_cloud/models/get_data.py create mode 100644 everos_cloud/models/get_input.py create mode 100644 everos_cloud/models/http_validation_error.py create mode 100644 everos_cloud/models/implicit_trait_data.py create mode 100644 everos_cloud/models/implicit_trait_patch.py create mode 100644 everos_cloud/models/message_item.py create mode 100644 everos_cloud/models/profile_item.py create mode 100644 everos_cloud/models/search_agent_case_item.py create mode 100644 everos_cloud/models/search_agent_skill_item.py create mode 100644 everos_cloud/models/search_atomic_fact_item.py create mode 100644 everos_cloud/models/search_data.py create mode 100644 everos_cloud/models/search_episode_item.py create mode 100644 everos_cloud/models/search_input.py create mode 100644 everos_cloud/models/search_profile_item.py create mode 100644 everos_cloud/models/sign_envelope.py create mode 100644 everos_cloud/models/sign_envelope_all_of_result.py create mode 100644 everos_cloud/models/sign_object_item.py create mode 100644 everos_cloud/models/sign_request.py create mode 100644 everos_cloud/models/sign_response.py create mode 100644 everos_cloud/models/sign_response_item.py create mode 100644 everos_cloud/models/signed_info.py create mode 100644 everos_cloud/models/success_envelope_add_data.py create mode 100644 everos_cloud/models/success_envelope_delete_data.py create mode 100644 everos_cloud/models/success_envelope_edit_data.py create mode 100644 everos_cloud/models/success_envelope_flush_data.py create mode 100644 everos_cloud/models/success_envelope_get_data.py create mode 100644 everos_cloud/models/success_envelope_search_data.py create mode 100644 everos_cloud/models/tool_call.py create mode 100644 everos_cloud/models/tool_call_function.py create mode 100644 everos_cloud/models/unprocessed_message_dto.py create mode 100644 everos_cloud/models/update_operation.py create mode 100644 everos_cloud/models/validation_error.py create mode 100644 everos_cloud/models/validation_error_loc_inner.py create mode 100644 everos_cloud/py.typed create mode 100644 everos_cloud/rest.py create mode 100644 openapi.json create mode 100644 pyproject.toml create mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 test-requirements.txt create mode 100644 test/__init__.py create mode 100644 test/test_add_data.py create mode 100644 test/test_add_input.py create mode 100644 test/test_add_operation.py create mode 100644 test/test_agent_case_item.py create mode 100644 test/test_agent_skill_item.py create mode 100644 test/test_atomic_fact_item.py create mode 100644 test/test_content.py create mode 100644 test/test_content_item.py create mode 100644 test/test_data.py create mode 100644 test/test_data1.py create mode 100644 test/test_delete_data.py create mode 100644 test/test_delete_input.py create mode 100644 test/test_delete_operation.py create mode 100644 test/test_edit_data.py create mode 100644 test/test_edit_input.py create mode 100644 test/test_edit_input_operations_inner.py create mode 100644 test/test_edit_result_item.py create mode 100644 test/test_envelope.py create mode 100644 test/test_envelope_result.py create mode 100644 test/test_episode_item.py create mode 100644 test/test_explicit_info_data.py create mode 100644 test/test_explicit_info_patch.py create mode 100644 test/test_filter_node.py create mode 100644 test/test_flush_data.py create mode 100644 test/test_flush_input.py create mode 100644 test/test_get_data.py create mode 100644 test/test_get_input.py create mode 100644 test/test_http_validation_error.py create mode 100644 test/test_implicit_trait_data.py create mode 100644 test/test_implicit_trait_patch.py create mode 100644 test/test_memory_api.py create mode 100644 test/test_message_item.py create mode 100644 test/test_profile_item.py create mode 100644 test/test_search_agent_case_item.py create mode 100644 test/test_search_agent_skill_item.py create mode 100644 test/test_search_atomic_fact_item.py create mode 100644 test/test_search_data.py create mode 100644 test/test_search_episode_item.py create mode 100644 test/test_search_input.py create mode 100644 test/test_search_profile_item.py create mode 100644 test/test_sign_envelope.py create mode 100644 test/test_sign_envelope_all_of_result.py create mode 100644 test/test_sign_object_item.py create mode 100644 test/test_sign_request.py create mode 100644 test/test_sign_response.py create mode 100644 test/test_sign_response_item.py create mode 100644 test/test_signed_info.py create mode 100644 test/test_storage_api.py create mode 100644 test/test_success_envelope_add_data.py create mode 100644 test/test_success_envelope_delete_data.py create mode 100644 test/test_success_envelope_edit_data.py create mode 100644 test/test_success_envelope_flush_data.py create mode 100644 test/test_success_envelope_get_data.py create mode 100644 test/test_success_envelope_search_data.py create mode 100644 test/test_tool_call.py create mode 100644 test/test_tool_call_function.py create mode 100644 test/test_unprocessed_message_dto.py create mode 100644 test/test_update_operation.py create mode 100644 test/test_validation_error.py create mode 100644 test/test_validation_error_loc_inner.py create mode 100644 tox.ini diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..09328eb --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,36 @@ +# IMPORTANT: this file is generated with the option `openapiGeneratorIgnoreList` enabled +# (--openapi-generator-ignore-list in CLI for example) so the entries below are pre-populated based +# on the input provided by the users and this file will be overwritten every time when the option is +# enabled (which is the exact opposite of the default behaviour to not overwrite +# .openapi-generator-ignore if the file exists). + +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + +# The following entries are pre-populated based on the input obtained via +# the option `openapiGeneratorIgnoreList` (--openapi-generator-ignore-list in CLI for example). +.github/workflows/python.yml +git_push.sh +.travis.yml +.gitlab-ci.yml diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..c71bc06 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,198 @@ +.gitignore +README.md +docs/AddData.md +docs/AddInput.md +docs/AddOperation.md +docs/AgentCaseItem.md +docs/AgentSkillItem.md +docs/AtomicFactItem.md +docs/Content.md +docs/ContentItem.md +docs/Data.md +docs/Data1.md +docs/DeleteData.md +docs/DeleteInput.md +docs/DeleteOperation.md +docs/EditData.md +docs/EditInput.md +docs/EditInputOperationsInner.md +docs/EditResultItem.md +docs/Envelope.md +docs/EnvelopeResult.md +docs/EpisodeItem.md +docs/ExplicitInfoData.md +docs/ExplicitInfoPatch.md +docs/FilterNode.md +docs/FlushData.md +docs/FlushInput.md +docs/GetData.md +docs/GetInput.md +docs/HTTPValidationError.md +docs/ImplicitTraitData.md +docs/ImplicitTraitPatch.md +docs/MemoryApi.md +docs/MessageItem.md +docs/ProfileItem.md +docs/SearchAgentCaseItem.md +docs/SearchAgentSkillItem.md +docs/SearchAtomicFactItem.md +docs/SearchData.md +docs/SearchEpisodeItem.md +docs/SearchInput.md +docs/SearchProfileItem.md +docs/SignEnvelope.md +docs/SignEnvelopeAllOfResult.md +docs/SignObjectItem.md +docs/SignRequest.md +docs/SignResponse.md +docs/SignResponseItem.md +docs/SignedInfo.md +docs/StorageApi.md +docs/SuccessEnvelopeAddData.md +docs/SuccessEnvelopeDeleteData.md +docs/SuccessEnvelopeEditData.md +docs/SuccessEnvelopeFlushData.md +docs/SuccessEnvelopeGetData.md +docs/SuccessEnvelopeSearchData.md +docs/ToolCall.md +docs/ToolCallFunction.md +docs/UnprocessedMessageDTO.md +docs/UpdateOperation.md +docs/ValidationError.md +docs/ValidationErrorLocInner.md +everos_cloud/__init__.py +everos_cloud/api/__init__.py +everos_cloud/api/memory_api.py +everos_cloud/api/storage_api.py +everos_cloud/api_client.py +everos_cloud/api_response.py +everos_cloud/configuration.py +everos_cloud/exceptions.py +everos_cloud/models/__init__.py +everos_cloud/models/add_data.py +everos_cloud/models/add_input.py +everos_cloud/models/add_operation.py +everos_cloud/models/agent_case_item.py +everos_cloud/models/agent_skill_item.py +everos_cloud/models/atomic_fact_item.py +everos_cloud/models/content.py +everos_cloud/models/content_item.py +everos_cloud/models/data.py +everos_cloud/models/data1.py +everos_cloud/models/delete_data.py +everos_cloud/models/delete_input.py +everos_cloud/models/delete_operation.py +everos_cloud/models/edit_data.py +everos_cloud/models/edit_input.py +everos_cloud/models/edit_input_operations_inner.py +everos_cloud/models/edit_result_item.py +everos_cloud/models/envelope.py +everos_cloud/models/envelope_result.py +everos_cloud/models/episode_item.py +everos_cloud/models/explicit_info_data.py +everos_cloud/models/explicit_info_patch.py +everos_cloud/models/filter_node.py +everos_cloud/models/flush_data.py +everos_cloud/models/flush_input.py +everos_cloud/models/get_data.py +everos_cloud/models/get_input.py +everos_cloud/models/http_validation_error.py +everos_cloud/models/implicit_trait_data.py +everos_cloud/models/implicit_trait_patch.py +everos_cloud/models/message_item.py +everos_cloud/models/profile_item.py +everos_cloud/models/search_agent_case_item.py +everos_cloud/models/search_agent_skill_item.py +everos_cloud/models/search_atomic_fact_item.py +everos_cloud/models/search_data.py +everos_cloud/models/search_episode_item.py +everos_cloud/models/search_input.py +everos_cloud/models/search_profile_item.py +everos_cloud/models/sign_envelope.py +everos_cloud/models/sign_envelope_all_of_result.py +everos_cloud/models/sign_object_item.py +everos_cloud/models/sign_request.py +everos_cloud/models/sign_response.py +everos_cloud/models/sign_response_item.py +everos_cloud/models/signed_info.py +everos_cloud/models/success_envelope_add_data.py +everos_cloud/models/success_envelope_delete_data.py +everos_cloud/models/success_envelope_edit_data.py +everos_cloud/models/success_envelope_flush_data.py +everos_cloud/models/success_envelope_get_data.py +everos_cloud/models/success_envelope_search_data.py +everos_cloud/models/tool_call.py +everos_cloud/models/tool_call_function.py +everos_cloud/models/unprocessed_message_dto.py +everos_cloud/models/update_operation.py +everos_cloud/models/validation_error.py +everos_cloud/models/validation_error_loc_inner.py +everos_cloud/py.typed +everos_cloud/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_add_data.py +test/test_add_input.py +test/test_add_operation.py +test/test_agent_case_item.py +test/test_agent_skill_item.py +test/test_atomic_fact_item.py +test/test_content.py +test/test_content_item.py +test/test_data.py +test/test_data1.py +test/test_delete_data.py +test/test_delete_input.py +test/test_delete_operation.py +test/test_edit_data.py +test/test_edit_input.py +test/test_edit_input_operations_inner.py +test/test_edit_result_item.py +test/test_envelope.py +test/test_envelope_result.py +test/test_episode_item.py +test/test_explicit_info_data.py +test/test_explicit_info_patch.py +test/test_filter_node.py +test/test_flush_data.py +test/test_flush_input.py +test/test_get_data.py +test/test_get_input.py +test/test_http_validation_error.py +test/test_implicit_trait_data.py +test/test_implicit_trait_patch.py +test/test_memory_api.py +test/test_message_item.py +test/test_profile_item.py +test/test_search_agent_case_item.py +test/test_search_agent_skill_item.py +test/test_search_atomic_fact_item.py +test/test_search_data.py +test/test_search_episode_item.py +test/test_search_input.py +test/test_search_profile_item.py +test/test_sign_envelope.py +test/test_sign_envelope_all_of_result.py +test/test_sign_object_item.py +test/test_sign_request.py +test/test_sign_response.py +test/test_sign_response_item.py +test/test_signed_info.py +test/test_storage_api.py +test/test_success_envelope_add_data.py +test/test_success_envelope_delete_data.py +test/test_success_envelope_edit_data.py +test/test_success_envelope_flush_data.py +test/test_success_envelope_get_data.py +test/test_success_envelope_search_data.py +test/test_tool_call.py +test/test_tool_call_function.py +test/test_unprocessed_message_dto.py +test/test_update_operation.py +test/test_validation_error.py +test/test_validation_error_loc_inner.py +tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..758bb9c --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.10.0 diff --git a/docs/AddData.md b/docs/AddData.md new file mode 100644 index 0000000..f25311b --- /dev/null +++ b/docs/AddData.md @@ -0,0 +1,30 @@ +# AddData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_count** | **int** | | +**status** | **str** | \"queued\" — async enqueue accepted (HTTP 202). \"accumulated\"/\"extracted\" — synchronous write outcome (HTTP 200, async_mode=false). | + +## Example + +```python +from everos_cloud.models.add_data import AddData + +# TODO update the JSON string below +json = "{}" +# create an instance of AddData from a JSON string +add_data_instance = AddData.from_json(json) +# print the JSON string representation of the object +print(AddData.to_json()) + +# convert the object into a dict +add_data_dict = add_data_instance.to_dict() +# create an instance of AddData from a dict +add_data_from_dict = AddData.from_dict(add_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddInput.md b/docs/AddInput.md new file mode 100644 index 0000000..9698b02 --- /dev/null +++ b/docs/AddInput.md @@ -0,0 +1,34 @@ +# AddInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_id** | **str** | | [optional] [default to 'default'] +**project_id** | **str** | | [optional] [default to 'default'] +**session_id** | **str** | | +**mode** | **str** | | [optional] [default to 'chat'] +**messages** | [**List[MessageItem]**](MessageItem.md) | | +**async_mode** | **bool** | Selects the write path. true (default): validated and enqueued asynchronously → HTTP 202 with status \"queued\". false: forwarded synchronously to the engine, returning its 200 result and surfacing write errors directly. Extraction is always asynchronous (flush-triggered). | [optional] [default to True] + +## Example + +```python +from everos_cloud.models.add_input import AddInput + +# TODO update the JSON string below +json = "{}" +# create an instance of AddInput from a JSON string +add_input_instance = AddInput.from_json(json) +# print the JSON string representation of the object +print(AddInput.to_json()) + +# convert the object into a dict +add_input_dict = add_input_instance.to_dict() +# create an instance of AddInput from a dict +add_input_from_dict = AddInput.from_dict(add_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddOperation.md b/docs/AddOperation.md new file mode 100644 index 0000000..d64580d --- /dev/null +++ b/docs/AddOperation.md @@ -0,0 +1,33 @@ +# AddOperation + +Add a new profile item (``item_id`` forbidden — the server mints it). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **str** | | [optional] +**action** | **str** | | +**type** | **str** | | +**data** | [**Data**](Data.md) | | + +## Example + +```python +from everos_cloud.models.add_operation import AddOperation + +# TODO update the JSON string below +json = "{}" +# create an instance of AddOperation from a JSON string +add_operation_instance = AddOperation.from_json(json) +# print the JSON string representation of the object +print(AddOperation.to_json()) + +# convert the object into a dict +add_operation_dict = add_operation_instance.to_dict() +# create an instance of AddOperation from a dict +add_operation_from_dict = AddOperation.from_dict(add_operation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentCaseItem.md b/docs/AgentCaseItem.md new file mode 100644 index 0000000..c247803 --- /dev/null +++ b/docs/AgentCaseItem.md @@ -0,0 +1,38 @@ +# AgentCaseItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**app_id** | **str** | | +**project_id** | **str** | | +**agent_id** | **str** | | +**session_id** | **str** | | +**task_intent** | **str** | | +**approach** | **str** | | +**quality_score** | **float** | | +**key_insight** | **str** | | [optional] +**timestamp** | **datetime** | | + +## Example + +```python +from everos_cloud.models.agent_case_item import AgentCaseItem + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentCaseItem from a JSON string +agent_case_item_instance = AgentCaseItem.from_json(json) +# print the JSON string representation of the object +print(AgentCaseItem.to_json()) + +# convert the object into a dict +agent_case_item_dict = agent_case_item_instance.to_dict() +# create an instance of AgentCaseItem from a dict +agent_case_item_from_dict = AgentCaseItem.from_dict(agent_case_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentSkillItem.md b/docs/AgentSkillItem.md new file mode 100644 index 0000000..ffa1287 --- /dev/null +++ b/docs/AgentSkillItem.md @@ -0,0 +1,38 @@ +# AgentSkillItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**app_id** | **str** | | +**project_id** | **str** | | +**agent_id** | **str** | | +**name** | **str** | | +**description** | **str** | | +**content** | **str** | | +**confidence** | **float** | | +**maturity_score** | **float** | | +**source_case_ids** | **List[str]** | | [optional] + +## Example + +```python +from everos_cloud.models.agent_skill_item import AgentSkillItem + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSkillItem from a JSON string +agent_skill_item_instance = AgentSkillItem.from_json(json) +# print the JSON string representation of the object +print(AgentSkillItem.to_json()) + +# convert the object into a dict +agent_skill_item_dict = agent_skill_item_instance.to_dict() +# create an instance of AgentSkillItem from a dict +agent_skill_item_from_dict = AgentSkillItem.from_dict(agent_skill_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AtomicFactItem.md b/docs/AtomicFactItem.md new file mode 100644 index 0000000..2b44349 --- /dev/null +++ b/docs/AtomicFactItem.md @@ -0,0 +1,31 @@ +# AtomicFactItem + +Atomic fact nested in an episode. Spec appendix E references it but does not enumerate its fields — minimal shape until the contract is detailed. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**content** | **str** | | + +## Example + +```python +from everos_cloud.models.atomic_fact_item import AtomicFactItem + +# TODO update the JSON string below +json = "{}" +# create an instance of AtomicFactItem from a JSON string +atomic_fact_item_instance = AtomicFactItem.from_json(json) +# print the JSON string representation of the object +print(AtomicFactItem.to_json()) + +# convert the object into a dict +atomic_fact_item_dict = atomic_fact_item_instance.to_dict() +# create an instance of AtomicFactItem from a dict +atomic_fact_item_from_dict = AtomicFactItem.from_dict(atomic_fact_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Content.md b/docs/Content.md new file mode 100644 index 0000000..59869ce --- /dev/null +++ b/docs/Content.md @@ -0,0 +1,28 @@ +# Content + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from everos_cloud.models.content import Content + +# TODO update the JSON string below +json = "{}" +# create an instance of Content from a JSON string +content_instance = Content.from_json(json) +# print the JSON string representation of the object +print(Content.to_json()) + +# convert the object into a dict +content_dict = content_instance.to_dict() +# create an instance of Content from a dict +content_from_dict = Content.from_dict(content_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ContentItem.md b/docs/ContentItem.md new file mode 100644 index 0000000..a555c1f --- /dev/null +++ b/docs/ContentItem.md @@ -0,0 +1,38 @@ +# ContentItem + +A single content element (appendix A). Current phase: only ``type=\"text\"``. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**text** | **str** | | [optional] +**source** | **str** | | [optional] +**var_base64** | **str** | | [optional] +**uri** | **str** | | [optional] +**ext** | **str** | | [optional] +**name** | **str** | | [optional] +**source_info** | **Dict[str, object]** | | [optional] +**extras** | **Dict[str, object]** | | [optional] + +## Example + +```python +from everos_cloud.models.content_item import ContentItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ContentItem from a JSON string +content_item_instance = ContentItem.from_json(json) +# print the JSON string representation of the object +print(ContentItem.to_json()) + +# convert the object into a dict +content_item_dict = content_item_instance.to_dict() +# create an instance of ContentItem from a dict +content_item_from_dict = ContentItem.from_dict(content_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Data.md b/docs/Data.md new file mode 100644 index 0000000..668d517 --- /dev/null +++ b/docs/Data.md @@ -0,0 +1,31 @@ +# Data + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | | +**description** | **str** | | +**trait** | **str** | | + +## Example + +```python +from everos_cloud.models.data import Data + +# TODO update the JSON string below +json = "{}" +# create an instance of Data from a JSON string +data_instance = Data.from_json(json) +# print the JSON string representation of the object +print(Data.to_json()) + +# convert the object into a dict +data_dict = data_instance.to_dict() +# create an instance of Data from a dict +data_from_dict = Data.from_dict(data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Data1.md b/docs/Data1.md new file mode 100644 index 0000000..d8e6736 --- /dev/null +++ b/docs/Data1.md @@ -0,0 +1,31 @@ +# Data1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | | [optional] +**description** | **str** | | [optional] +**trait** | **str** | | [optional] + +## Example + +```python +from everos_cloud.models.data1 import Data1 + +# TODO update the JSON string below +json = "{}" +# create an instance of Data1 from a JSON string +data1_instance = Data1.from_json(json) +# print the JSON string representation of the object +print(Data1.to_json()) + +# convert the object into a dict +data1_dict = data1_instance.to_dict() +# create an instance of Data1 from a dict +data1_from_dict = Data1.from_dict(data1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteData.md b/docs/DeleteData.md new file mode 100644 index 0000000..5096deb --- /dev/null +++ b/docs/DeleteData.md @@ -0,0 +1,31 @@ +# DeleteData + +Delete result (mirrors v1 ``DeleteMemoriesResult``): which scope filters were applied + how many mongo records were soft-deleted across all memory types. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filters** | **List[str]** | Scope filters used, e.g. ['user_id'] or ['user_id', 'session_id'] | [optional] +**count** | **int** | Total memory records soft-deleted | [optional] [default to 0] + +## Example + +```python +from everos_cloud.models.delete_data import DeleteData + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteData from a JSON string +delete_data_instance = DeleteData.from_json(json) +# print the JSON string representation of the object +print(DeleteData.to_json()) + +# convert the object into a dict +delete_data_dict = delete_data_instance.to_dict() +# create an instance of DeleteData from a dict +delete_data_from_dict = DeleteData.from_dict(delete_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteInput.md b/docs/DeleteInput.md new file mode 100644 index 0000000..f32d714 --- /dev/null +++ b/docs/DeleteInput.md @@ -0,0 +1,33 @@ +# DeleteInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_id** | **str** | | [optional] [default to 'default'] +**project_id** | **str** | | [optional] [default to 'default'] +**user_id** | **str** | | [optional] +**agent_id** | **str** | | [optional] +**session_id** | **str** | | [optional] + +## Example + +```python +from everos_cloud.models.delete_input import DeleteInput + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteInput from a JSON string +delete_input_instance = DeleteInput.from_json(json) +# print the JSON string representation of the object +print(DeleteInput.to_json()) + +# convert the object into a dict +delete_input_dict = delete_input_instance.to_dict() +# create an instance of DeleteInput from a dict +delete_input_from_dict = DeleteInput.from_dict(delete_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteOperation.md b/docs/DeleteOperation.md new file mode 100644 index 0000000..0194a16 --- /dev/null +++ b/docs/DeleteOperation.md @@ -0,0 +1,33 @@ +# DeleteOperation + +Delete an existing profile item by ``item_id`` (carries no ``data``). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **str** | | [optional] +**action** | **str** | | +**type** | **str** | | +**item_id** | **str** | | + +## Example + +```python +from everos_cloud.models.delete_operation import DeleteOperation + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteOperation from a JSON string +delete_operation_instance = DeleteOperation.from_json(json) +# print the JSON string representation of the object +print(DeleteOperation.to_json()) + +# convert the object into a dict +delete_operation_dict = delete_operation_instance.to_dict() +# create an instance of DeleteOperation from a dict +delete_operation_from_dict = DeleteOperation.from_dict(delete_operation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditData.md b/docs/EditData.md new file mode 100644 index 0000000..17d43e4 --- /dev/null +++ b/docs/EditData.md @@ -0,0 +1,34 @@ +# EditData + +Response payload for a successful profile edit request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | +**version** | **int** | | +**applied** | **int** | | +**results** | [**List[EditResultItem]**](EditResultItem.md) | | [optional] +**profile** | **Dict[str, object]** | | [optional] + +## Example + +```python +from everos_cloud.models.edit_data import EditData + +# TODO update the JSON string below +json = "{}" +# create an instance of EditData from a JSON string +edit_data_instance = EditData.from_json(json) +# print the JSON string representation of the object +print(EditData.to_json()) + +# convert the object into a dict +edit_data_dict = edit_data_instance.to_dict() +# create an instance of EditData from a dict +edit_data_from_dict = EditData.from_dict(edit_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditInput.md b/docs/EditInput.md new file mode 100644 index 0000000..43493ab --- /dev/null +++ b/docs/EditInput.md @@ -0,0 +1,34 @@ +# EditInput + +Bulk profile edit request [Cloud-only]. Carries 1–50 ``EditOperation`` items targeting a single user's profile. ``memory_type`` is pinned to ``\"profile\"``; ``source`` is server-set and not accepted from the client. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_id** | **str** | | [optional] [default to 'default'] +**project_id** | **str** | | [optional] [default to 'default'] +**user_id** | **str** | | +**memory_type** | **str** | | [optional] [default to 'profile'] +**operations** | [**List[EditInputOperationsInner]**](EditInputOperationsInner.md) | | + +## Example + +```python +from everos_cloud.models.edit_input import EditInput + +# TODO update the JSON string below +json = "{}" +# create an instance of EditInput from a JSON string +edit_input_instance = EditInput.from_json(json) +# print the JSON string representation of the object +print(EditInput.to_json()) + +# convert the object into a dict +edit_input_dict = edit_input_instance.to_dict() +# create an instance of EditInput from a dict +edit_input_from_dict = EditInput.from_dict(edit_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditInputOperationsInner.md b/docs/EditInputOperationsInner.md new file mode 100644 index 0000000..a64596a --- /dev/null +++ b/docs/EditInputOperationsInner.md @@ -0,0 +1,33 @@ +# EditInputOperationsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **str** | | [optional] +**action** | **str** | | +**type** | **str** | | +**data** | [**Data1**](Data1.md) | | +**item_id** | **str** | | + +## Example + +```python +from everos_cloud.models.edit_input_operations_inner import EditInputOperationsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of EditInputOperationsInner from a JSON string +edit_input_operations_inner_instance = EditInputOperationsInner.from_json(json) +# print the JSON string representation of the object +print(EditInputOperationsInner.to_json()) + +# convert the object into a dict +edit_input_operations_inner_dict = edit_input_operations_inner_instance.to_dict() +# create an instance of EditInputOperationsInner from a dict +edit_input_operations_inner_from_dict = EditInputOperationsInner.from_dict(edit_input_operations_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditResultItem.md b/docs/EditResultItem.md new file mode 100644 index 0000000..cff6f1e --- /dev/null +++ b/docs/EditResultItem.md @@ -0,0 +1,36 @@ +# EditResultItem + +Per-operation outcome returned in ``EditData.results``. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**op_index** | **int** | | +**action** | **str** | | +**type** | **str** | | +**status** | **str** | | +**item_id** | **str** | | [optional] +**new_item_id** | **str** | | [optional] +**error** | **str** | | [optional] + +## Example + +```python +from everos_cloud.models.edit_result_item import EditResultItem + +# TODO update the JSON string below +json = "{}" +# create an instance of EditResultItem from a JSON string +edit_result_item_instance = EditResultItem.from_json(json) +# print the JSON string representation of the object +print(EditResultItem.to_json()) + +# convert the object into a dict +edit_result_item_dict = edit_result_item_instance.to_dict() +# create an instance of EditResultItem from a dict +edit_result_item_from_dict = EditResultItem.from_dict(edit_result_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Envelope.md b/docs/Envelope.md new file mode 100644 index 0000000..3942b7c --- /dev/null +++ b/docs/Envelope.md @@ -0,0 +1,33 @@ +# Envelope + +Common response envelope + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | `\"OK\"` on success, otherwise a human-readable error message decoded from the business error. | [optional] +**request_id** | **str** | | [optional] +**status** | **int** | Business status code; 0 means success | [optional] +**result** | [**EnvelopeResult**](EnvelopeResult.md) | | [optional] + +## Example + +```python +from everos_cloud.models.envelope import Envelope + +# TODO update the JSON string below +json = "{}" +# create an instance of Envelope from a JSON string +envelope_instance = Envelope.from_json(json) +# print the JSON string representation of the object +print(Envelope.to_json()) + +# convert the object into a dict +envelope_dict = envelope_instance.to_dict() +# create an instance of Envelope from a dict +envelope_from_dict = Envelope.from_dict(envelope_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EnvelopeResult.md b/docs/EnvelopeResult.md new file mode 100644 index 0000000..0e54369 --- /dev/null +++ b/docs/EnvelopeResult.md @@ -0,0 +1,29 @@ +# EnvelopeResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **object** | | [optional] + +## Example + +```python +from everos_cloud.models.envelope_result import EnvelopeResult + +# TODO update the JSON string below +json = "{}" +# create an instance of EnvelopeResult from a JSON string +envelope_result_instance = EnvelopeResult.from_json(json) +# print the JSON string representation of the object +print(EnvelopeResult.to_json()) + +# convert the object into a dict +envelope_result_dict = envelope_result_instance.to_dict() +# create an instance of EnvelopeResult from a dict +envelope_result_from_dict = EnvelopeResult.from_dict(envelope_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EpisodeItem.md b/docs/EpisodeItem.md new file mode 100644 index 0000000..87a8828 --- /dev/null +++ b/docs/EpisodeItem.md @@ -0,0 +1,40 @@ +# EpisodeItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**app_id** | **str** | | +**project_id** | **str** | | +**user_id** | **str** | | [optional] +**session_id** | **str** | | [optional] +**timestamp** | **datetime** | | +**sender_ids** | **List[str]** | | [optional] +**summary** | **str** | | +**subject** | **str** | | +**episode** | **str** | | +**type** | **str** | | +**atomic_facts** | [**List[AtomicFactItem]**](AtomicFactItem.md) | | [optional] + +## Example + +```python +from everos_cloud.models.episode_item import EpisodeItem + +# TODO update the JSON string below +json = "{}" +# create an instance of EpisodeItem from a JSON string +episode_item_instance = EpisodeItem.from_json(json) +# print the JSON string representation of the object +print(EpisodeItem.to_json()) + +# convert the object into a dict +episode_item_dict = episode_item_instance.to_dict() +# create an instance of EpisodeItem from a dict +episode_item_from_dict = EpisodeItem.from_dict(episode_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExplicitInfoData.md b/docs/ExplicitInfoData.md new file mode 100644 index 0000000..6032d29 --- /dev/null +++ b/docs/ExplicitInfoData.md @@ -0,0 +1,31 @@ +# ExplicitInfoData + +``data`` payload for ``add explicit_info`` — ``category`` + ``description`` required (non-empty); other fields (``evidence``, ``sources``, …) pass through. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | | +**description** | **str** | | + +## Example + +```python +from everos_cloud.models.explicit_info_data import ExplicitInfoData + +# TODO update the JSON string below +json = "{}" +# create an instance of ExplicitInfoData from a JSON string +explicit_info_data_instance = ExplicitInfoData.from_json(json) +# print the JSON string representation of the object +print(ExplicitInfoData.to_json()) + +# convert the object into a dict +explicit_info_data_dict = explicit_info_data_instance.to_dict() +# create an instance of ExplicitInfoData from a dict +explicit_info_data_from_dict = ExplicitInfoData.from_dict(explicit_info_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExplicitInfoPatch.md b/docs/ExplicitInfoPatch.md new file mode 100644 index 0000000..29d22da --- /dev/null +++ b/docs/ExplicitInfoPatch.md @@ -0,0 +1,31 @@ +# ExplicitInfoPatch + +``data`` payload for ``update explicit_info`` — partial; at least one of ``category`` / ``description`` (non-empty if present); others pass through. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from everos_cloud.models.explicit_info_patch import ExplicitInfoPatch + +# TODO update the JSON string below +json = "{}" +# create an instance of ExplicitInfoPatch from a JSON string +explicit_info_patch_instance = ExplicitInfoPatch.from_json(json) +# print the JSON string representation of the object +print(ExplicitInfoPatch.to_json()) + +# convert the object into a dict +explicit_info_patch_dict = explicit_info_patch_instance.to_dict() +# create an instance of ExplicitInfoPatch from a dict +explicit_info_patch_from_dict = ExplicitInfoPatch.from_dict(explicit_info_patch_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilterNode.md b/docs/FilterNode.md new file mode 100644 index 0000000..360016a --- /dev/null +++ b/docs/FilterNode.md @@ -0,0 +1,31 @@ +# FilterNode + +One Filters DSL node — recursive ``AND`` / ``OR`` arrays plus arbitrary scalar field conditions at the same level. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_and** | [**List[FilterNode]**](FilterNode.md) | | [optional] +**var_or** | [**List[FilterNode]**](FilterNode.md) | | [optional] + +## Example + +```python +from everos_cloud.models.filter_node import FilterNode + +# TODO update the JSON string below +json = "{}" +# create an instance of FilterNode from a JSON string +filter_node_instance = FilterNode.from_json(json) +# print the JSON string representation of the object +print(FilterNode.to_json()) + +# convert the object into a dict +filter_node_dict = filter_node_instance.to_dict() +# create an instance of FilterNode from a dict +filter_node_from_dict = FilterNode.from_dict(filter_node_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlushData.md b/docs/FlushData.md new file mode 100644 index 0000000..2e0ea6a --- /dev/null +++ b/docs/FlushData.md @@ -0,0 +1,29 @@ +# FlushData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | + +## Example + +```python +from everos_cloud.models.flush_data import FlushData + +# TODO update the JSON string below +json = "{}" +# create an instance of FlushData from a JSON string +flush_data_instance = FlushData.from_json(json) +# print the JSON string representation of the object +print(FlushData.to_json()) + +# convert the object into a dict +flush_data_dict = flush_data_instance.to_dict() +# create an instance of FlushData from a dict +flush_data_from_dict = FlushData.from_dict(flush_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlushInput.md b/docs/FlushInput.md new file mode 100644 index 0000000..7e3ab0b --- /dev/null +++ b/docs/FlushInput.md @@ -0,0 +1,31 @@ +# FlushInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_id** | **str** | | [optional] [default to 'default'] +**project_id** | **str** | | [optional] [default to 'default'] +**session_id** | **str** | | + +## Example + +```python +from everos_cloud.models.flush_input import FlushInput + +# TODO update the JSON string below +json = "{}" +# create an instance of FlushInput from a JSON string +flush_input_instance = FlushInput.from_json(json) +# print the JSON string representation of the object +print(FlushInput.to_json()) + +# convert the object into a dict +flush_input_dict = flush_input_instance.to_dict() +# create an instance of FlushInput from a dict +flush_input_from_dict = FlushInput.from_dict(flush_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetData.md b/docs/GetData.md new file mode 100644 index 0000000..e561319 --- /dev/null +++ b/docs/GetData.md @@ -0,0 +1,34 @@ +# GetData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**episodes** | [**List[EpisodeItem]**](EpisodeItem.md) | | [optional] +**profiles** | [**List[ProfileItem]**](ProfileItem.md) | | [optional] +**agent_cases** | [**List[AgentCaseItem]**](AgentCaseItem.md) | | [optional] +**agent_skills** | [**List[AgentSkillItem]**](AgentSkillItem.md) | | [optional] +**total_count** | **int** | | [optional] [default to 0] +**count** | **int** | | [optional] [default to 0] + +## Example + +```python +from everos_cloud.models.get_data import GetData + +# TODO update the JSON string below +json = "{}" +# create an instance of GetData from a JSON string +get_data_instance = GetData.from_json(json) +# print the JSON string representation of the object +print(GetData.to_json()) + +# convert the object into a dict +get_data_dict = get_data_instance.to_dict() +# create an instance of GetData from a dict +get_data_from_dict = GetData.from_dict(get_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetInput.md b/docs/GetInput.md new file mode 100644 index 0000000..fcfd211 --- /dev/null +++ b/docs/GetInput.md @@ -0,0 +1,38 @@ +# GetInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_id** | **str** | | [optional] [default to 'default'] +**project_id** | **str** | | [optional] [default to 'default'] +**user_id** | **str** | | [optional] +**agent_id** | **str** | | [optional] +**memory_type** | **str** | | +**page** | **int** | | [optional] [default to 1] +**page_size** | **int** | | [optional] [default to 20] +**sort_by** | **str** | | [optional] [default to 'timestamp'] +**sort_order** | **str** | | [optional] [default to 'desc'] +**filters** | [**FilterNode**](FilterNode.md) | | [optional] + +## Example + +```python +from everos_cloud.models.get_input import GetInput + +# TODO update the JSON string below +json = "{}" +# create an instance of GetInput from a JSON string +get_input_instance = GetInput.from_json(json) +# print the JSON string representation of the object +print(GetInput.to_json()) + +# convert the object into a dict +get_input_dict = get_input_instance.to_dict() +# create an instance of GetInput from a dict +get_input_from_dict = GetInput.from_dict(get_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HTTPValidationError.md b/docs/HTTPValidationError.md new file mode 100644 index 0000000..c34ef27 --- /dev/null +++ b/docs/HTTPValidationError.md @@ -0,0 +1,29 @@ +# HTTPValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail** | [**List[ValidationError]**](ValidationError.md) | | [optional] + +## Example + +```python +from everos_cloud.models.http_validation_error import HTTPValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of HTTPValidationError from a JSON string +http_validation_error_instance = HTTPValidationError.from_json(json) +# print the JSON string representation of the object +print(HTTPValidationError.to_json()) + +# convert the object into a dict +http_validation_error_dict = http_validation_error_instance.to_dict() +# create an instance of HTTPValidationError from a dict +http_validation_error_from_dict = HTTPValidationError.from_dict(http_validation_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImplicitTraitData.md b/docs/ImplicitTraitData.md new file mode 100644 index 0000000..b8e320d --- /dev/null +++ b/docs/ImplicitTraitData.md @@ -0,0 +1,31 @@ +# ImplicitTraitData + +``data`` payload for ``add implicit_traits`` — ``trait`` + ``description`` required (non-empty); other fields (``basis``, ``evidence``, ``sources``, …) pass through. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trait** | **str** | | +**description** | **str** | | + +## Example + +```python +from everos_cloud.models.implicit_trait_data import ImplicitTraitData + +# TODO update the JSON string below +json = "{}" +# create an instance of ImplicitTraitData from a JSON string +implicit_trait_data_instance = ImplicitTraitData.from_json(json) +# print the JSON string representation of the object +print(ImplicitTraitData.to_json()) + +# convert the object into a dict +implicit_trait_data_dict = implicit_trait_data_instance.to_dict() +# create an instance of ImplicitTraitData from a dict +implicit_trait_data_from_dict = ImplicitTraitData.from_dict(implicit_trait_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImplicitTraitPatch.md b/docs/ImplicitTraitPatch.md new file mode 100644 index 0000000..d3348de --- /dev/null +++ b/docs/ImplicitTraitPatch.md @@ -0,0 +1,31 @@ +# ImplicitTraitPatch + +``data`` payload for ``update implicit_traits`` — partial; at least one of ``trait`` / ``description`` (non-empty if present); others pass through. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trait** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from everos_cloud.models.implicit_trait_patch import ImplicitTraitPatch + +# TODO update the JSON string below +json = "{}" +# create an instance of ImplicitTraitPatch from a JSON string +implicit_trait_patch_instance = ImplicitTraitPatch.from_json(json) +# print the JSON string representation of the object +print(ImplicitTraitPatch.to_json()) + +# convert the object into a dict +implicit_trait_patch_dict = implicit_trait_patch_instance.to_dict() +# create an instance of ImplicitTraitPatch from a dict +implicit_trait_patch_from_dict = ImplicitTraitPatch.from_dict(implicit_trait_patch_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MemoryApi.md b/docs/MemoryApi.md new file mode 100644 index 0000000..1225563 --- /dev/null +++ b/docs/MemoryApi.md @@ -0,0 +1,507 @@ +# everos_cloud.MemoryApi + +All URIs are relative to *https://api.evermind.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_memory**](MemoryApi.md#add_memory) | **POST** /api/v2/memory/add | Add messages [OSS + Cloud] +[**delete_memory**](MemoryApi.md#delete_memory) | **POST** /api/v2/memory/delete | Delete memories [Cloud-only] +[**edit_profile**](MemoryApi.md#edit_profile) | **POST** /api/v2/memory/edit | Edit profile items [Cloud-only] +[**flush_api_v2_memory_flush_post**](MemoryApi.md#flush_api_v2_memory_flush_post) | **POST** /api/v2/memory/flush | Force boundary detection + extraction [OSS + Cloud] +[**get_memory**](MemoryApi.md#get_memory) | **POST** /api/v2/memory/get | Get memories (paginated) [OSS + Cloud] +[**search_memory**](MemoryApi.md#search_memory) | **POST** /api/v2/memory/search | Search memories [OSS + Cloud] + + +# **add_memory** +> SuccessEnvelopeAddData add_memory(add_input) + +Add messages [OSS + Cloud] + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import everos_cloud +from everos_cloud.models.add_input import AddInput +from everos_cloud.models.success_envelope_add_data import SuccessEnvelopeAddData +from everos_cloud.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.evermind.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = everos_cloud.Configuration( + host = "https://api.evermind.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = everos_cloud.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with everos_cloud.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = everos_cloud.MemoryApi(api_client) + add_input = everos_cloud.AddInput() # AddInput | + + try: + # Add messages [OSS + Cloud] + api_response = api_instance.add_memory(add_input) + print("The response of MemoryApi->add_memory:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MemoryApi->add_memory: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **add_input** | [**AddInput**](AddInput.md)| | + +### Return type + +[**SuccessEnvelopeAddData**](SuccessEnvelopeAddData.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Synchronous write result (async_mode=false). | - | +**422** | Validation Error | - | +**202** | Accepted for asynchronous processing (async_mode=true, default). | - | +**401** | Missing or invalid bearer token. | - | +**403** | Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). | - | +**429** | Rate limit or quota exceeded. | - | +**503** | The gateway could not reach the authentication service. Transient — retry with backoff. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_memory** +> SuccessEnvelopeDeleteData delete_memory(delete_input) + +Delete memories [Cloud-only] + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import everos_cloud +from everos_cloud.models.delete_input import DeleteInput +from everos_cloud.models.success_envelope_delete_data import SuccessEnvelopeDeleteData +from everos_cloud.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.evermind.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = everos_cloud.Configuration( + host = "https://api.evermind.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = everos_cloud.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with everos_cloud.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = everos_cloud.MemoryApi(api_client) + delete_input = everos_cloud.DeleteInput() # DeleteInput | + + try: + # Delete memories [Cloud-only] + api_response = api_instance.delete_memory(delete_input) + print("The response of MemoryApi->delete_memory:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MemoryApi->delete_memory: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **delete_input** | [**DeleteInput**](DeleteInput.md)| | + +### Return type + +[**SuccessEnvelopeDeleteData**](SuccessEnvelopeDeleteData.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | +**401** | Missing or invalid bearer token. | - | +**403** | Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). | - | +**429** | Rate limit or quota exceeded. | - | +**503** | The gateway could not reach the authentication service. Transient — retry with backoff. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **edit_profile** +> SuccessEnvelopeEditData edit_profile(edit_input) + +Edit profile items [Cloud-only] + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import everos_cloud +from everos_cloud.models.edit_input import EditInput +from everos_cloud.models.success_envelope_edit_data import SuccessEnvelopeEditData +from everos_cloud.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.evermind.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = everos_cloud.Configuration( + host = "https://api.evermind.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = everos_cloud.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with everos_cloud.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = everos_cloud.MemoryApi(api_client) + edit_input = everos_cloud.EditInput() # EditInput | + + try: + # Edit profile items [Cloud-only] + api_response = api_instance.edit_profile(edit_input) + print("The response of MemoryApi->edit_profile:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MemoryApi->edit_profile: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **edit_input** | [**EditInput**](EditInput.md)| | + +### Return type + +[**SuccessEnvelopeEditData**](SuccessEnvelopeEditData.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | +**401** | Missing or invalid bearer token. | - | +**403** | Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). | - | +**429** | Rate limit or quota exceeded. | - | +**503** | The gateway could not reach the authentication service. Transient — retry with backoff. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **flush_api_v2_memory_flush_post** +> SuccessEnvelopeFlushData flush_api_v2_memory_flush_post(flush_input) + +Force boundary detection + extraction [OSS + Cloud] + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import everos_cloud +from everos_cloud.models.flush_input import FlushInput +from everos_cloud.models.success_envelope_flush_data import SuccessEnvelopeFlushData +from everos_cloud.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.evermind.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = everos_cloud.Configuration( + host = "https://api.evermind.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = everos_cloud.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with everos_cloud.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = everos_cloud.MemoryApi(api_client) + flush_input = everos_cloud.FlushInput() # FlushInput | + + try: + # Force boundary detection + extraction [OSS + Cloud] + api_response = api_instance.flush_api_v2_memory_flush_post(flush_input) + print("The response of MemoryApi->flush_api_v2_memory_flush_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MemoryApi->flush_api_v2_memory_flush_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flush_input** | [**FlushInput**](FlushInput.md)| | + +### Return type + +[**SuccessEnvelopeFlushData**](SuccessEnvelopeFlushData.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | +**401** | Missing or invalid bearer token. | - | +**403** | Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). | - | +**429** | Rate limit or quota exceeded. | - | +**503** | The gateway could not reach the authentication service. Transient — retry with backoff. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_memory** +> SuccessEnvelopeGetData get_memory(get_input) + +Get memories (paginated) [OSS + Cloud] + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import everos_cloud +from everos_cloud.models.get_input import GetInput +from everos_cloud.models.success_envelope_get_data import SuccessEnvelopeGetData +from everos_cloud.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.evermind.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = everos_cloud.Configuration( + host = "https://api.evermind.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = everos_cloud.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with everos_cloud.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = everos_cloud.MemoryApi(api_client) + get_input = everos_cloud.GetInput() # GetInput | + + try: + # Get memories (paginated) [OSS + Cloud] + api_response = api_instance.get_memory(get_input) + print("The response of MemoryApi->get_memory:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MemoryApi->get_memory: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **get_input** | [**GetInput**](GetInput.md)| | + +### Return type + +[**SuccessEnvelopeGetData**](SuccessEnvelopeGetData.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | +**401** | Missing or invalid bearer token. | - | +**403** | Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). | - | +**429** | Rate limit or quota exceeded. | - | +**503** | The gateway could not reach the authentication service. Transient — retry with backoff. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **search_memory** +> SuccessEnvelopeSearchData search_memory(search_input) + +Search memories [OSS + Cloud] + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import everos_cloud +from everos_cloud.models.search_input import SearchInput +from everos_cloud.models.success_envelope_search_data import SuccessEnvelopeSearchData +from everos_cloud.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.evermind.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = everos_cloud.Configuration( + host = "https://api.evermind.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = everos_cloud.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with everos_cloud.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = everos_cloud.MemoryApi(api_client) + search_input = everos_cloud.SearchInput() # SearchInput | + + try: + # Search memories [OSS + Cloud] + api_response = api_instance.search_memory(search_input) + print("The response of MemoryApi->search_memory:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MemoryApi->search_memory: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search_input** | [**SearchInput**](SearchInput.md)| | + +### Return type + +[**SuccessEnvelopeSearchData**](SuccessEnvelopeSearchData.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | +**401** | Missing or invalid bearer token. | - | +**403** | Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). | - | +**429** | Rate limit or quota exceeded. | - | +**503** | The gateway could not reach the authentication service. Transient — retry with backoff. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/MessageItem.md b/docs/MessageItem.md new file mode 100644 index 0000000..7047e22 --- /dev/null +++ b/docs/MessageItem.md @@ -0,0 +1,36 @@ +# MessageItem + +One message in an /add batch (spec §2). ``content`` accepts a plain string (shorthand for a single text ContentItem) or an explicit ContentItem list. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sender_id** | **str** | | +**sender_name** | **str** | | [optional] +**role** | **str** | | +**timestamp** | **int** | | +**content** | [**Content**](Content.md) | | +**tool_calls** | [**List[ToolCall]**](ToolCall.md) | | [optional] +**tool_call_id** | **str** | | [optional] + +## Example + +```python +from everos_cloud.models.message_item import MessageItem + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageItem from a JSON string +message_item_instance = MessageItem.from_json(json) +# print the JSON string representation of the object +print(MessageItem.to_json()) + +# convert the object into a dict +message_item_dict = message_item_instance.to_dict() +# create an instance of MessageItem from a dict +message_item_from_dict = MessageItem.from_dict(message_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProfileItem.md b/docs/ProfileItem.md new file mode 100644 index 0000000..10bb570 --- /dev/null +++ b/docs/ProfileItem.md @@ -0,0 +1,33 @@ +# ProfileItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**app_id** | **str** | | +**project_id** | **str** | | +**user_id** | **str** | | +**profile_data** | **Dict[str, object]** | | [optional] + +## Example + +```python +from everos_cloud.models.profile_item import ProfileItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ProfileItem from a JSON string +profile_item_instance = ProfileItem.from_json(json) +# print the JSON string representation of the object +print(ProfileItem.to_json()) + +# convert the object into a dict +profile_item_dict = profile_item_instance.to_dict() +# create an instance of ProfileItem from a dict +profile_item_from_dict = ProfileItem.from_dict(profile_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchAgentCaseItem.md b/docs/SearchAgentCaseItem.md new file mode 100644 index 0000000..02701b3 --- /dev/null +++ b/docs/SearchAgentCaseItem.md @@ -0,0 +1,39 @@ +# SearchAgentCaseItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**app_id** | **str** | | +**project_id** | **str** | | +**agent_id** | **str** | | +**session_id** | **str** | | +**task_intent** | **str** | | +**approach** | **str** | | +**quality_score** | **float** | | +**key_insight** | **str** | | [optional] +**timestamp** | **datetime** | | +**score** | **float** | | + +## Example + +```python +from everos_cloud.models.search_agent_case_item import SearchAgentCaseItem + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchAgentCaseItem from a JSON string +search_agent_case_item_instance = SearchAgentCaseItem.from_json(json) +# print the JSON string representation of the object +print(SearchAgentCaseItem.to_json()) + +# convert the object into a dict +search_agent_case_item_dict = search_agent_case_item_instance.to_dict() +# create an instance of SearchAgentCaseItem from a dict +search_agent_case_item_from_dict = SearchAgentCaseItem.from_dict(search_agent_case_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchAgentSkillItem.md b/docs/SearchAgentSkillItem.md new file mode 100644 index 0000000..e921a2a --- /dev/null +++ b/docs/SearchAgentSkillItem.md @@ -0,0 +1,39 @@ +# SearchAgentSkillItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**app_id** | **str** | | +**project_id** | **str** | | +**agent_id** | **str** | | +**name** | **str** | | +**description** | **str** | | +**content** | **str** | | +**confidence** | **float** | | +**maturity_score** | **float** | | +**source_case_ids** | **List[str]** | | [optional] +**score** | **float** | | + +## Example + +```python +from everos_cloud.models.search_agent_skill_item import SearchAgentSkillItem + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchAgentSkillItem from a JSON string +search_agent_skill_item_instance = SearchAgentSkillItem.from_json(json) +# print the JSON string representation of the object +print(SearchAgentSkillItem.to_json()) + +# convert the object into a dict +search_agent_skill_item_dict = search_agent_skill_item_instance.to_dict() +# create an instance of SearchAgentSkillItem from a dict +search_agent_skill_item_from_dict = SearchAgentSkillItem.from_dict(search_agent_skill_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchAtomicFactItem.md b/docs/SearchAtomicFactItem.md new file mode 100644 index 0000000..33276f1 --- /dev/null +++ b/docs/SearchAtomicFactItem.md @@ -0,0 +1,31 @@ +# SearchAtomicFactItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**content** | **str** | | +**score** | **float** | | + +## Example + +```python +from everos_cloud.models.search_atomic_fact_item import SearchAtomicFactItem + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchAtomicFactItem from a JSON string +search_atomic_fact_item_instance = SearchAtomicFactItem.from_json(json) +# print the JSON string representation of the object +print(SearchAtomicFactItem.to_json()) + +# convert the object into a dict +search_atomic_fact_item_dict = search_atomic_fact_item_instance.to_dict() +# create an instance of SearchAtomicFactItem from a dict +search_atomic_fact_item_from_dict = SearchAtomicFactItem.from_dict(search_atomic_fact_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchData.md b/docs/SearchData.md new file mode 100644 index 0000000..4e78041 --- /dev/null +++ b/docs/SearchData.md @@ -0,0 +1,33 @@ +# SearchData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**episodes** | [**List[SearchEpisodeItem]**](SearchEpisodeItem.md) | | [optional] +**profiles** | [**List[SearchProfileItem]**](SearchProfileItem.md) | | [optional] +**agent_cases** | [**List[SearchAgentCaseItem]**](SearchAgentCaseItem.md) | | [optional] +**agent_skills** | [**List[SearchAgentSkillItem]**](SearchAgentSkillItem.md) | | [optional] +**unprocessed_messages** | [**List[UnprocessedMessageDTO]**](UnprocessedMessageDTO.md) | | [optional] + +## Example + +```python +from everos_cloud.models.search_data import SearchData + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchData from a JSON string +search_data_instance = SearchData.from_json(json) +# print the JSON string representation of the object +print(SearchData.to_json()) + +# convert the object into a dict +search_data_dict = search_data_instance.to_dict() +# create an instance of SearchData from a dict +search_data_from_dict = SearchData.from_dict(search_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchEpisodeItem.md b/docs/SearchEpisodeItem.md new file mode 100644 index 0000000..1dbe473 --- /dev/null +++ b/docs/SearchEpisodeItem.md @@ -0,0 +1,41 @@ +# SearchEpisodeItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**app_id** | **str** | | +**project_id** | **str** | | +**user_id** | **str** | | [optional] +**session_id** | **str** | | [optional] +**timestamp** | **datetime** | | +**sender_ids** | **List[str]** | | [optional] +**summary** | **str** | | +**subject** | **str** | | +**episode** | **str** | | +**type** | **str** | | +**atomic_facts** | [**List[SearchAtomicFactItem]**](SearchAtomicFactItem.md) | | [optional] +**score** | **float** | | + +## Example + +```python +from everos_cloud.models.search_episode_item import SearchEpisodeItem + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchEpisodeItem from a JSON string +search_episode_item_instance = SearchEpisodeItem.from_json(json) +# print the JSON string representation of the object +print(SearchEpisodeItem.to_json()) + +# convert the object into a dict +search_episode_item_dict = search_episode_item_instance.to_dict() +# create an instance of SearchEpisodeItem from a dict +search_episode_item_from_dict = SearchEpisodeItem.from_dict(search_episode_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchInput.md b/docs/SearchInput.md new file mode 100644 index 0000000..4840be3 --- /dev/null +++ b/docs/SearchInput.md @@ -0,0 +1,40 @@ +# SearchInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_id** | **str** | | [optional] [default to 'default'] +**project_id** | **str** | | [optional] [default to 'default'] +**user_id** | **str** | | [optional] +**agent_id** | **str** | | [optional] +**query** | **str** | | +**method** | **str** | | [optional] [default to 'hybrid'] +**top_k** | **int** | | [optional] [default to -1] +**radius** | **float** | | [optional] +**min_score** | **float** | | [optional] +**include_profile** | **bool** | | [optional] [default to False] +**enable_llm_rerank** | **bool** | | [optional] [default to False] +**filters** | [**FilterNode**](FilterNode.md) | | [optional] + +## Example + +```python +from everos_cloud.models.search_input import SearchInput + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchInput from a JSON string +search_input_instance = SearchInput.from_json(json) +# print the JSON string representation of the object +print(SearchInput.to_json()) + +# convert the object into a dict +search_input_dict = search_input_instance.to_dict() +# create an instance of SearchInput from a dict +search_input_from_dict = SearchInput.from_dict(search_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchProfileItem.md b/docs/SearchProfileItem.md new file mode 100644 index 0000000..2228d2d --- /dev/null +++ b/docs/SearchProfileItem.md @@ -0,0 +1,34 @@ +# SearchProfileItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**app_id** | **str** | | +**project_id** | **str** | | +**user_id** | **str** | | +**profile_data** | **Dict[str, object]** | | [optional] +**score** | **float** | | [optional] + +## Example + +```python +from everos_cloud.models.search_profile_item import SearchProfileItem + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchProfileItem from a JSON string +search_profile_item_instance = SearchProfileItem.from_json(json) +# print the JSON string representation of the object +print(SearchProfileItem.to_json()) + +# convert the object into a dict +search_profile_item_dict = search_profile_item_instance.to_dict() +# create an instance of SearchProfileItem from a dict +search_profile_item_from_dict = SearchProfileItem.from_dict(search_profile_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignEnvelope.md b/docs/SignEnvelope.md new file mode 100644 index 0000000..7461bdf --- /dev/null +++ b/docs/SignEnvelope.md @@ -0,0 +1,33 @@ +# SignEnvelope + +Response envelope for the sign endpoint. The `result.data` shape depends on `status`: - `status: 0` (success) — `result.data` is a `SignResponse`, as modelled below. - `status: 2018` (validation failed) — `result.data` is a plain string carrying the validator error message, not a `SignResponse`. - all other non-zero statuses — `result.data` is `null`. Generated clients should treat `result.data` as populated only when `status` is 0. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | `\"OK\"` on success, otherwise a human-readable error message decoded from the business error. | [optional] +**request_id** | **str** | | [optional] +**status** | **int** | Business status code; 0 means success | [optional] +**result** | [**SignEnvelopeAllOfResult**](SignEnvelopeAllOfResult.md) | | [optional] + +## Example + +```python +from everos_cloud.models.sign_envelope import SignEnvelope + +# TODO update the JSON string below +json = "{}" +# create an instance of SignEnvelope from a JSON string +sign_envelope_instance = SignEnvelope.from_json(json) +# print the JSON string representation of the object +print(SignEnvelope.to_json()) + +# convert the object into a dict +sign_envelope_dict = sign_envelope_instance.to_dict() +# create an instance of SignEnvelope from a dict +sign_envelope_from_dict = SignEnvelope.from_dict(sign_envelope_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignEnvelopeAllOfResult.md b/docs/SignEnvelopeAllOfResult.md new file mode 100644 index 0000000..dc2e7a7 --- /dev/null +++ b/docs/SignEnvelopeAllOfResult.md @@ -0,0 +1,29 @@ +# SignEnvelopeAllOfResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SignResponse**](SignResponse.md) | | [optional] + +## Example + +```python +from everos_cloud.models.sign_envelope_all_of_result import SignEnvelopeAllOfResult + +# TODO update the JSON string below +json = "{}" +# create an instance of SignEnvelopeAllOfResult from a JSON string +sign_envelope_all_of_result_instance = SignEnvelopeAllOfResult.from_json(json) +# print the JSON string representation of the object +print(SignEnvelopeAllOfResult.to_json()) + +# convert the object into a dict +sign_envelope_all_of_result_dict = sign_envelope_all_of_result_instance.to_dict() +# create an instance of SignEnvelopeAllOfResult from a dict +sign_envelope_all_of_result_from_dict = SignEnvelopeAllOfResult.from_dict(sign_envelope_all_of_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignObjectItem.md b/docs/SignObjectItem.md new file mode 100644 index 0000000..acf5262 --- /dev/null +++ b/docs/SignObjectItem.md @@ -0,0 +1,31 @@ +# SignObjectItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_id** | **str** | | +**file_name** | **str** | | +**file_type** | **str** | Media class. Default size limits per type: image=10MB, file=100MB, video=500MB. These are defaults and may be overridden per token (via the token's `file_limits`); the effective limit is enforced by S3 through the presigned POST `content-length-range` condition, and surfaced as `objectSignedInfo.maxSize`. | + +## Example + +```python +from everos_cloud.models.sign_object_item import SignObjectItem + +# TODO update the JSON string below +json = "{}" +# create an instance of SignObjectItem from a JSON string +sign_object_item_instance = SignObjectItem.from_json(json) +# print the JSON string representation of the object +print(SignObjectItem.to_json()) + +# convert the object into a dict +sign_object_item_dict = sign_object_item_instance.to_dict() +# create an instance of SignObjectItem from a dict +sign_object_item_from_dict = SignObjectItem.from_dict(sign_object_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignRequest.md b/docs/SignRequest.md new file mode 100644 index 0000000..5c9bf6d --- /dev/null +++ b/docs/SignRequest.md @@ -0,0 +1,29 @@ +# SignRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_list** | [**List[SignObjectItem]**](SignObjectItem.md) | Objects to sign for upload. At most 50 per request (`status: 1007` if exceeded). Each `fileId` must be unique within the request (`status: 1009` on duplicates). | + +## Example + +```python +from everos_cloud.models.sign_request import SignRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SignRequest from a JSON string +sign_request_instance = SignRequest.from_json(json) +# print the JSON string representation of the object +print(SignRequest.to_json()) + +# convert the object into a dict +sign_request_dict = sign_request_instance.to_dict() +# create an instance of SignRequest from a dict +sign_request_from_dict = SignRequest.from_dict(sign_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignResponse.md b/docs/SignResponse.md new file mode 100644 index 0000000..3896b89 --- /dev/null +++ b/docs/SignResponse.md @@ -0,0 +1,29 @@ +# SignResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_list** | [**List[SignResponseItem]**](SignResponseItem.md) | | [optional] + +## Example + +```python +from everos_cloud.models.sign_response import SignResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SignResponse from a JSON string +sign_response_instance = SignResponse.from_json(json) +# print the JSON string representation of the object +print(SignResponse.to_json()) + +# convert the object into a dict +sign_response_dict = sign_response_instance.to_dict() +# create an instance of SignResponse from a dict +sign_response_from_dict = SignResponse.from_dict(sign_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignResponseItem.md b/docs/SignResponseItem.md new file mode 100644 index 0000000..b2441e2 --- /dev/null +++ b/docs/SignResponseItem.md @@ -0,0 +1,34 @@ +# SignResponseItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_id** | **str** | | [optional] +**file_name** | **str** | | [optional] +**file_type** | **str** | | [optional] +**object_key** | **str** | | [optional] +**object_url** | **str** | Present in the response struct for parity with the find endpoint, but not populated on the sign path (omitted from the JSON). | [optional] +**object_signed_info** | [**SignedInfo**](SignedInfo.md) | | [optional] + +## Example + +```python +from everos_cloud.models.sign_response_item import SignResponseItem + +# TODO update the JSON string below +json = "{}" +# create an instance of SignResponseItem from a JSON string +sign_response_item_instance = SignResponseItem.from_json(json) +# print the JSON string representation of the object +print(SignResponseItem.to_json()) + +# convert the object into a dict +sign_response_item_dict = sign_response_item_instance.to_dict() +# create an instance of SignResponseItem from a dict +sign_response_item_from_dict = SignResponseItem.from_dict(sign_response_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignedInfo.md b/docs/SignedInfo.md new file mode 100644 index 0000000..9aeb0d4 --- /dev/null +++ b/docs/SignedInfo.md @@ -0,0 +1,32 @@ +# SignedInfo + +Presigned POST form data for direct-to-S3 upload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**fields** | **Dict[str, str]** | | [optional] +**max_size** | **int** | Maximum file size in bytes | [optional] + +## Example + +```python +from everos_cloud.models.signed_info import SignedInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of SignedInfo from a JSON string +signed_info_instance = SignedInfo.from_json(json) +# print the JSON string representation of the object +print(SignedInfo.to_json()) + +# convert the object into a dict +signed_info_dict = signed_info_instance.to_dict() +# create an instance of SignedInfo from a dict +signed_info_from_dict = SignedInfo.from_dict(signed_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageApi.md b/docs/StorageApi.md new file mode 100644 index 0000000..491a6db --- /dev/null +++ b/docs/StorageApi.md @@ -0,0 +1,90 @@ +# everos_cloud.StorageApi + +All URIs are relative to *https://api.evermind.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sign_objects**](StorageApi.md#sign_objects) | **POST** /api/v2/object/sign | Upload multimodal data (generate presigned upload info) + + +# **sign_objects** +> SignEnvelope sign_objects(sign_request) + +Upload multimodal data (generate presigned upload info) + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import everos_cloud +from everos_cloud.models.sign_envelope import SignEnvelope +from everos_cloud.models.sign_request import SignRequest +from everos_cloud.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.evermind.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = everos_cloud.Configuration( + host = "https://api.evermind.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = everos_cloud.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with everos_cloud.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = everos_cloud.StorageApi(api_client) + sign_request = everos_cloud.SignRequest() # SignRequest | + + try: + # Upload multimodal data (generate presigned upload info) + api_response = api_instance.sign_objects(sign_request) + print("The response of StorageApi->sign_objects:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageApi->sign_objects: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_request** | [**SignRequest**](SignRequest.md)| | + +### Return type + +[**SignEnvelope**](SignEnvelope.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Envelope response (MMS returns HTTP 200 for every business outcome; only unmatched routes return 404). `status: 0` means success and `result.data` is a SignResponse. Non-zero `status` values seen on this endpoint: - `20003` — request body bind failure (malformed JSON). - `2018` — parameter validation failed (e.g. missing `objectList`, `fileId`, `fileName`, or `fileType`); `result.data` is the validator error string. - `1012` — `mms-token` missing, invalid, expired, or revoked (emitted by the auth middleware before the handler runs). - `1013` — token lacks the required `object:sign` scope. - `1007` — `objectList` exceeds the per-request limit of 50. - `1002` — `fileType` not one of image/video/file. - `1009` — duplicate `fileId` within the request. - `1004` — S3 operation failed (bucket unavailable). - `1005` — presigned POST generation failed. - `2015` — object metadata persistence failed. - `20001` — unhandled internal server error. | - | +**401** | Missing or invalid bearer token. | - | +**403** | Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). | - | +**429** | Rate limit or quota exceeded. | - | +**503** | The gateway could not reach the authentication service. Transient — retry with backoff. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SuccessEnvelopeAddData.md b/docs/SuccessEnvelopeAddData.md new file mode 100644 index 0000000..89c9170 --- /dev/null +++ b/docs/SuccessEnvelopeAddData.md @@ -0,0 +1,30 @@ +# SuccessEnvelopeAddData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_id** | **str** | Request trace id (peer to data) | +**data** | [**AddData**](AddData.md) | Endpoint-defined business result | + +## Example + +```python +from everos_cloud.models.success_envelope_add_data import SuccessEnvelopeAddData + +# TODO update the JSON string below +json = "{}" +# create an instance of SuccessEnvelopeAddData from a JSON string +success_envelope_add_data_instance = SuccessEnvelopeAddData.from_json(json) +# print the JSON string representation of the object +print(SuccessEnvelopeAddData.to_json()) + +# convert the object into a dict +success_envelope_add_data_dict = success_envelope_add_data_instance.to_dict() +# create an instance of SuccessEnvelopeAddData from a dict +success_envelope_add_data_from_dict = SuccessEnvelopeAddData.from_dict(success_envelope_add_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SuccessEnvelopeDeleteData.md b/docs/SuccessEnvelopeDeleteData.md new file mode 100644 index 0000000..081d275 --- /dev/null +++ b/docs/SuccessEnvelopeDeleteData.md @@ -0,0 +1,30 @@ +# SuccessEnvelopeDeleteData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_id** | **str** | Request trace id (peer to data) | +**data** | [**DeleteData**](DeleteData.md) | Endpoint-defined business result | + +## Example + +```python +from everos_cloud.models.success_envelope_delete_data import SuccessEnvelopeDeleteData + +# TODO update the JSON string below +json = "{}" +# create an instance of SuccessEnvelopeDeleteData from a JSON string +success_envelope_delete_data_instance = SuccessEnvelopeDeleteData.from_json(json) +# print the JSON string representation of the object +print(SuccessEnvelopeDeleteData.to_json()) + +# convert the object into a dict +success_envelope_delete_data_dict = success_envelope_delete_data_instance.to_dict() +# create an instance of SuccessEnvelopeDeleteData from a dict +success_envelope_delete_data_from_dict = SuccessEnvelopeDeleteData.from_dict(success_envelope_delete_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SuccessEnvelopeEditData.md b/docs/SuccessEnvelopeEditData.md new file mode 100644 index 0000000..aac46f8 --- /dev/null +++ b/docs/SuccessEnvelopeEditData.md @@ -0,0 +1,30 @@ +# SuccessEnvelopeEditData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_id** | **str** | Request trace id (peer to data) | +**data** | [**EditData**](EditData.md) | Endpoint-defined business result | + +## Example + +```python +from everos_cloud.models.success_envelope_edit_data import SuccessEnvelopeEditData + +# TODO update the JSON string below +json = "{}" +# create an instance of SuccessEnvelopeEditData from a JSON string +success_envelope_edit_data_instance = SuccessEnvelopeEditData.from_json(json) +# print the JSON string representation of the object +print(SuccessEnvelopeEditData.to_json()) + +# convert the object into a dict +success_envelope_edit_data_dict = success_envelope_edit_data_instance.to_dict() +# create an instance of SuccessEnvelopeEditData from a dict +success_envelope_edit_data_from_dict = SuccessEnvelopeEditData.from_dict(success_envelope_edit_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SuccessEnvelopeFlushData.md b/docs/SuccessEnvelopeFlushData.md new file mode 100644 index 0000000..588bde2 --- /dev/null +++ b/docs/SuccessEnvelopeFlushData.md @@ -0,0 +1,30 @@ +# SuccessEnvelopeFlushData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_id** | **str** | Request trace id (peer to data) | +**data** | [**FlushData**](FlushData.md) | Endpoint-defined business result | + +## Example + +```python +from everos_cloud.models.success_envelope_flush_data import SuccessEnvelopeFlushData + +# TODO update the JSON string below +json = "{}" +# create an instance of SuccessEnvelopeFlushData from a JSON string +success_envelope_flush_data_instance = SuccessEnvelopeFlushData.from_json(json) +# print the JSON string representation of the object +print(SuccessEnvelopeFlushData.to_json()) + +# convert the object into a dict +success_envelope_flush_data_dict = success_envelope_flush_data_instance.to_dict() +# create an instance of SuccessEnvelopeFlushData from a dict +success_envelope_flush_data_from_dict = SuccessEnvelopeFlushData.from_dict(success_envelope_flush_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SuccessEnvelopeGetData.md b/docs/SuccessEnvelopeGetData.md new file mode 100644 index 0000000..5a7d721 --- /dev/null +++ b/docs/SuccessEnvelopeGetData.md @@ -0,0 +1,30 @@ +# SuccessEnvelopeGetData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_id** | **str** | Request trace id (peer to data) | +**data** | [**GetData**](GetData.md) | Endpoint-defined business result | + +## Example + +```python +from everos_cloud.models.success_envelope_get_data import SuccessEnvelopeGetData + +# TODO update the JSON string below +json = "{}" +# create an instance of SuccessEnvelopeGetData from a JSON string +success_envelope_get_data_instance = SuccessEnvelopeGetData.from_json(json) +# print the JSON string representation of the object +print(SuccessEnvelopeGetData.to_json()) + +# convert the object into a dict +success_envelope_get_data_dict = success_envelope_get_data_instance.to_dict() +# create an instance of SuccessEnvelopeGetData from a dict +success_envelope_get_data_from_dict = SuccessEnvelopeGetData.from_dict(success_envelope_get_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SuccessEnvelopeSearchData.md b/docs/SuccessEnvelopeSearchData.md new file mode 100644 index 0000000..987df4e --- /dev/null +++ b/docs/SuccessEnvelopeSearchData.md @@ -0,0 +1,30 @@ +# SuccessEnvelopeSearchData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_id** | **str** | Request trace id (peer to data) | +**data** | [**SearchData**](SearchData.md) | Endpoint-defined business result | + +## Example + +```python +from everos_cloud.models.success_envelope_search_data import SuccessEnvelopeSearchData + +# TODO update the JSON string below +json = "{}" +# create an instance of SuccessEnvelopeSearchData from a JSON string +success_envelope_search_data_instance = SuccessEnvelopeSearchData.from_json(json) +# print the JSON string representation of the object +print(SuccessEnvelopeSearchData.to_json()) + +# convert the object into a dict +success_envelope_search_data_dict = success_envelope_search_data_instance.to_dict() +# create an instance of SuccessEnvelopeSearchData from a dict +success_envelope_search_data_from_dict = SuccessEnvelopeSearchData.from_dict(success_envelope_search_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ToolCall.md b/docs/ToolCall.md new file mode 100644 index 0000000..d187ff8 --- /dev/null +++ b/docs/ToolCall.md @@ -0,0 +1,31 @@ +# ToolCall + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | [optional] [default to 'function'] +**function** | [**ToolCallFunction**](ToolCallFunction.md) | | + +## Example + +```python +from everos_cloud.models.tool_call import ToolCall + +# TODO update the JSON string below +json = "{}" +# create an instance of ToolCall from a JSON string +tool_call_instance = ToolCall.from_json(json) +# print the JSON string representation of the object +print(ToolCall.to_json()) + +# convert the object into a dict +tool_call_dict = tool_call_instance.to_dict() +# create an instance of ToolCall from a dict +tool_call_from_dict = ToolCall.from_dict(tool_call_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ToolCallFunction.md b/docs/ToolCallFunction.md new file mode 100644 index 0000000..7b52d86 --- /dev/null +++ b/docs/ToolCallFunction.md @@ -0,0 +1,30 @@ +# ToolCallFunction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**arguments** | **str** | | + +## Example + +```python +from everos_cloud.models.tool_call_function import ToolCallFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of ToolCallFunction from a JSON string +tool_call_function_instance = ToolCallFunction.from_json(json) +# print the JSON string representation of the object +print(ToolCallFunction.to_json()) + +# convert the object into a dict +tool_call_function_dict = tool_call_function_instance.to_dict() +# create an instance of ToolCallFunction from a dict +tool_call_function_from_dict = ToolCallFunction.from_dict(tool_call_function_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnprocessedMessageDTO.md b/docs/UnprocessedMessageDTO.md new file mode 100644 index 0000000..85509cb --- /dev/null +++ b/docs/UnprocessedMessageDTO.md @@ -0,0 +1,40 @@ +# UnprocessedMessageDTO + +Buffered raw message not yet extracted (no owner — inference happens after boundary detection). Returned by /search only when ``filters.session_id`` is a top-level eq scalar (spec §4 / appendix E). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**app_id** | **str** | | +**project_id** | **str** | | +**session_id** | **str** | | +**sender_id** | **str** | | +**sender_name** | **str** | | [optional] +**role** | **str** | | +**content** | [**Content**](Content.md) | | +**timestamp** | **datetime** | | +**tool_calls** | [**List[ToolCall]**](ToolCall.md) | | [optional] +**tool_call_id** | **str** | | [optional] + +## Example + +```python +from everos_cloud.models.unprocessed_message_dto import UnprocessedMessageDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of UnprocessedMessageDTO from a JSON string +unprocessed_message_dto_instance = UnprocessedMessageDTO.from_json(json) +# print the JSON string representation of the object +print(UnprocessedMessageDTO.to_json()) + +# convert the object into a dict +unprocessed_message_dto_dict = unprocessed_message_dto_instance.to_dict() +# create an instance of UnprocessedMessageDTO from a dict +unprocessed_message_dto_from_dict = UnprocessedMessageDTO.from_dict(unprocessed_message_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateOperation.md b/docs/UpdateOperation.md new file mode 100644 index 0000000..5a166b1 --- /dev/null +++ b/docs/UpdateOperation.md @@ -0,0 +1,34 @@ +# UpdateOperation + +Update an existing profile item (partial ``data`` shallow-merge). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **str** | | [optional] +**action** | **str** | | +**type** | **str** | | +**item_id** | **str** | | +**data** | [**Data1**](Data1.md) | | + +## Example + +```python +from everos_cloud.models.update_operation import UpdateOperation + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateOperation from a JSON string +update_operation_instance = UpdateOperation.from_json(json) +# print the JSON string representation of the object +print(UpdateOperation.to_json()) + +# convert the object into a dict +update_operation_dict = update_operation_instance.to_dict() +# create an instance of UpdateOperation from a dict +update_operation_from_dict = UpdateOperation.from_dict(update_operation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ValidationError.md b/docs/ValidationError.md new file mode 100644 index 0000000..cd5716c --- /dev/null +++ b/docs/ValidationError.md @@ -0,0 +1,31 @@ +# ValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | | +**msg** | **str** | | +**type** | **str** | | + +## Example + +```python +from everos_cloud.models.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) + +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ValidationErrorLocInner.md b/docs/ValidationErrorLocInner.md new file mode 100644 index 0000000..28cd21d --- /dev/null +++ b/docs/ValidationErrorLocInner.md @@ -0,0 +1,28 @@ +# ValidationErrorLocInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from everos_cloud.models.validation_error_loc_inner import ValidationErrorLocInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorLocInner from a JSON string +validation_error_loc_inner_instance = ValidationErrorLocInner.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorLocInner.to_json()) + +# convert the object into a dict +validation_error_loc_inner_dict = validation_error_loc_inner_instance.to_dict() +# create an instance of ValidationErrorLocInner from a dict +validation_error_loc_inner_from_dict = ValidationErrorLocInner.from_dict(validation_error_loc_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/everos_cloud/__init__.py b/everos_cloud/__init__.py new file mode 100644 index 0000000..9fc1c5e --- /dev/null +++ b/everos_cloud/__init__.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +# flake8: noqa + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0-rc1" + +# import apis into sdk package +from everos_cloud.api.memory_api import MemoryApi +from everos_cloud.api.storage_api import StorageApi + +# import ApiClient +from everos_cloud.api_response import ApiResponse +from everos_cloud.api_client import ApiClient +from everos_cloud.configuration import Configuration +from everos_cloud.exceptions import OpenApiException +from everos_cloud.exceptions import ApiTypeError +from everos_cloud.exceptions import ApiValueError +from everos_cloud.exceptions import ApiKeyError +from everos_cloud.exceptions import ApiAttributeError +from everos_cloud.exceptions import ApiException + +# import models into sdk package +from everos_cloud.models.add_data import AddData +from everos_cloud.models.add_input import AddInput +from everos_cloud.models.add_operation import AddOperation +from everos_cloud.models.agent_case_item import AgentCaseItem +from everos_cloud.models.agent_skill_item import AgentSkillItem +from everos_cloud.models.atomic_fact_item import AtomicFactItem +from everos_cloud.models.content import Content +from everos_cloud.models.content_item import ContentItem +from everos_cloud.models.data import Data +from everos_cloud.models.data1 import Data1 +from everos_cloud.models.delete_data import DeleteData +from everos_cloud.models.delete_input import DeleteInput +from everos_cloud.models.delete_operation import DeleteOperation +from everos_cloud.models.edit_data import EditData +from everos_cloud.models.edit_input import EditInput +from everos_cloud.models.edit_input_operations_inner import EditInputOperationsInner +from everos_cloud.models.edit_result_item import EditResultItem +from everos_cloud.models.envelope import Envelope +from everos_cloud.models.envelope_result import EnvelopeResult +from everos_cloud.models.episode_item import EpisodeItem +from everos_cloud.models.explicit_info_data import ExplicitInfoData +from everos_cloud.models.explicit_info_patch import ExplicitInfoPatch +from everos_cloud.models.filter_node import FilterNode +from everos_cloud.models.flush_data import FlushData +from everos_cloud.models.flush_input import FlushInput +from everos_cloud.models.get_data import GetData +from everos_cloud.models.get_input import GetInput +from everos_cloud.models.http_validation_error import HTTPValidationError +from everos_cloud.models.implicit_trait_data import ImplicitTraitData +from everos_cloud.models.implicit_trait_patch import ImplicitTraitPatch +from everos_cloud.models.message_item import MessageItem +from everos_cloud.models.profile_item import ProfileItem +from everos_cloud.models.search_agent_case_item import SearchAgentCaseItem +from everos_cloud.models.search_agent_skill_item import SearchAgentSkillItem +from everos_cloud.models.search_atomic_fact_item import SearchAtomicFactItem +from everos_cloud.models.search_data import SearchData +from everos_cloud.models.search_episode_item import SearchEpisodeItem +from everos_cloud.models.search_input import SearchInput +from everos_cloud.models.search_profile_item import SearchProfileItem +from everos_cloud.models.sign_envelope import SignEnvelope +from everos_cloud.models.sign_envelope_all_of_result import SignEnvelopeAllOfResult +from everos_cloud.models.sign_object_item import SignObjectItem +from everos_cloud.models.sign_request import SignRequest +from everos_cloud.models.sign_response import SignResponse +from everos_cloud.models.sign_response_item import SignResponseItem +from everos_cloud.models.signed_info import SignedInfo +from everos_cloud.models.success_envelope_add_data import SuccessEnvelopeAddData +from everos_cloud.models.success_envelope_delete_data import SuccessEnvelopeDeleteData +from everos_cloud.models.success_envelope_edit_data import SuccessEnvelopeEditData +from everos_cloud.models.success_envelope_flush_data import SuccessEnvelopeFlushData +from everos_cloud.models.success_envelope_get_data import SuccessEnvelopeGetData +from everos_cloud.models.success_envelope_search_data import SuccessEnvelopeSearchData +from everos_cloud.models.tool_call import ToolCall +from everos_cloud.models.tool_call_function import ToolCallFunction +from everos_cloud.models.unprocessed_message_dto import UnprocessedMessageDTO +from everos_cloud.models.update_operation import UpdateOperation +from everos_cloud.models.validation_error import ValidationError +from everos_cloud.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/everos_cloud/api/__init__.py b/everos_cloud/api/__init__.py new file mode 100644 index 0000000..5ec9e40 --- /dev/null +++ b/everos_cloud/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from everos_cloud.api.memory_api import MemoryApi +from everos_cloud.api.storage_api import StorageApi + diff --git a/everos_cloud/api/memory_api.py b/everos_cloud/api/memory_api.py new file mode 100644 index 0000000..c20e702 --- /dev/null +++ b/everos_cloud/api/memory_api.py @@ -0,0 +1,1767 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from everos_cloud.models.add_input import AddInput +from everos_cloud.models.delete_input import DeleteInput +from everos_cloud.models.edit_input import EditInput +from everos_cloud.models.flush_input import FlushInput +from everos_cloud.models.get_input import GetInput +from everos_cloud.models.search_input import SearchInput +from everos_cloud.models.success_envelope_add_data import SuccessEnvelopeAddData +from everos_cloud.models.success_envelope_delete_data import SuccessEnvelopeDeleteData +from everos_cloud.models.success_envelope_edit_data import SuccessEnvelopeEditData +from everos_cloud.models.success_envelope_flush_data import SuccessEnvelopeFlushData +from everos_cloud.models.success_envelope_get_data import SuccessEnvelopeGetData +from everos_cloud.models.success_envelope_search_data import SuccessEnvelopeSearchData + +from everos_cloud.api_client import ApiClient, RequestSerialized +from everos_cloud.api_response import ApiResponse +from everos_cloud.rest import RESTResponseType + + +class MemoryApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_memory( + self, + add_input: AddInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessEnvelopeAddData: + """Add messages [OSS + Cloud] + + + :param add_input: (required) + :type add_input: AddInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_memory_serialize( + add_input=add_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeAddData", + '422': "HTTPValidationError", + '202': "SuccessEnvelopeAddData", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_memory_with_http_info( + self, + add_input: AddInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessEnvelopeAddData]: + """Add messages [OSS + Cloud] + + + :param add_input: (required) + :type add_input: AddInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_memory_serialize( + add_input=add_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeAddData", + '422': "HTTPValidationError", + '202': "SuccessEnvelopeAddData", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_memory_without_preload_content( + self, + add_input: AddInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add messages [OSS + Cloud] + + + :param add_input: (required) + :type add_input: AddInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_memory_serialize( + add_input=add_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeAddData", + '422': "HTTPValidationError", + '202': "SuccessEnvelopeAddData", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_memory_serialize( + self, + add_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_input is not None: + _body_params = add_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v2/memory/add', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_memory( + self, + delete_input: DeleteInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessEnvelopeDeleteData: + """Delete memories [Cloud-only] + + + :param delete_input: (required) + :type delete_input: DeleteInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_memory_serialize( + delete_input=delete_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeDeleteData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_memory_with_http_info( + self, + delete_input: DeleteInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessEnvelopeDeleteData]: + """Delete memories [Cloud-only] + + + :param delete_input: (required) + :type delete_input: DeleteInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_memory_serialize( + delete_input=delete_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeDeleteData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_memory_without_preload_content( + self, + delete_input: DeleteInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete memories [Cloud-only] + + + :param delete_input: (required) + :type delete_input: DeleteInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_memory_serialize( + delete_input=delete_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeDeleteData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_memory_serialize( + self, + delete_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if delete_input is not None: + _body_params = delete_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v2/memory/delete', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def edit_profile( + self, + edit_input: EditInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessEnvelopeEditData: + """Edit profile items [Cloud-only] + + + :param edit_input: (required) + :type edit_input: EditInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_profile_serialize( + edit_input=edit_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeEditData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def edit_profile_with_http_info( + self, + edit_input: EditInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessEnvelopeEditData]: + """Edit profile items [Cloud-only] + + + :param edit_input: (required) + :type edit_input: EditInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_profile_serialize( + edit_input=edit_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeEditData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def edit_profile_without_preload_content( + self, + edit_input: EditInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit profile items [Cloud-only] + + + :param edit_input: (required) + :type edit_input: EditInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_profile_serialize( + edit_input=edit_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeEditData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_profile_serialize( + self, + edit_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edit_input is not None: + _body_params = edit_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v2/memory/edit', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def flush_api_v2_memory_flush_post( + self, + flush_input: FlushInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessEnvelopeFlushData: + """Force boundary detection + extraction [OSS + Cloud] + + + :param flush_input: (required) + :type flush_input: FlushInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._flush_api_v2_memory_flush_post_serialize( + flush_input=flush_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeFlushData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def flush_api_v2_memory_flush_post_with_http_info( + self, + flush_input: FlushInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessEnvelopeFlushData]: + """Force boundary detection + extraction [OSS + Cloud] + + + :param flush_input: (required) + :type flush_input: FlushInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._flush_api_v2_memory_flush_post_serialize( + flush_input=flush_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeFlushData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def flush_api_v2_memory_flush_post_without_preload_content( + self, + flush_input: FlushInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Force boundary detection + extraction [OSS + Cloud] + + + :param flush_input: (required) + :type flush_input: FlushInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._flush_api_v2_memory_flush_post_serialize( + flush_input=flush_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeFlushData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _flush_api_v2_memory_flush_post_serialize( + self, + flush_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if flush_input is not None: + _body_params = flush_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v2/memory/flush', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_memory( + self, + get_input: GetInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessEnvelopeGetData: + """Get memories (paginated) [OSS + Cloud] + + + :param get_input: (required) + :type get_input: GetInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_memory_serialize( + get_input=get_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeGetData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_memory_with_http_info( + self, + get_input: GetInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessEnvelopeGetData]: + """Get memories (paginated) [OSS + Cloud] + + + :param get_input: (required) + :type get_input: GetInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_memory_serialize( + get_input=get_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeGetData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_memory_without_preload_content( + self, + get_input: GetInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get memories (paginated) [OSS + Cloud] + + + :param get_input: (required) + :type get_input: GetInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_memory_serialize( + get_input=get_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeGetData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_memory_serialize( + self, + get_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if get_input is not None: + _body_params = get_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v2/memory/get', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def search_memory( + self, + search_input: SearchInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessEnvelopeSearchData: + """Search memories [OSS + Cloud] + + + :param search_input: (required) + :type search_input: SearchInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._search_memory_serialize( + search_input=search_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeSearchData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def search_memory_with_http_info( + self, + search_input: SearchInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessEnvelopeSearchData]: + """Search memories [OSS + Cloud] + + + :param search_input: (required) + :type search_input: SearchInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._search_memory_serialize( + search_input=search_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeSearchData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def search_memory_without_preload_content( + self, + search_input: SearchInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Search memories [OSS + Cloud] + + + :param search_input: (required) + :type search_input: SearchInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._search_memory_serialize( + search_input=search_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessEnvelopeSearchData", + '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _search_memory_serialize( + self, + search_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if search_input is not None: + _body_params = search_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v2/memory/search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/everos_cloud/api/storage_api.py b/everos_cloud/api/storage_api.py new file mode 100644 index 0000000..2dc6763 --- /dev/null +++ b/everos_cloud/api/storage_api.py @@ -0,0 +1,321 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from everos_cloud.models.sign_envelope import SignEnvelope +from everos_cloud.models.sign_request import SignRequest + +from everos_cloud.api_client import ApiClient, RequestSerialized +from everos_cloud.api_response import ApiResponse +from everos_cloud.rest import RESTResponseType + + +class StorageApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sign_objects( + self, + sign_request: SignRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SignEnvelope: + """Upload multimodal data (generate presigned upload info) + + + :param sign_request: (required) + :type sign_request: SignRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sign_objects_serialize( + sign_request=sign_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignEnvelope", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sign_objects_with_http_info( + self, + sign_request: SignRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignEnvelope]: + """Upload multimodal data (generate presigned upload info) + + + :param sign_request: (required) + :type sign_request: SignRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sign_objects_serialize( + sign_request=sign_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignEnvelope", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sign_objects_without_preload_content( + self, + sign_request: SignRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload multimodal data (generate presigned upload info) + + + :param sign_request: (required) + :type sign_request: SignRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sign_objects_serialize( + sign_request=sign_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignEnvelope", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sign_objects_serialize( + self, + sign_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if sign_request is not None: + _body_params = sign_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v2/object/sign', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/everos_cloud/api_client.py b/everos_cloud/api_client.py new file mode 100644 index 0000000..880ed83 --- /dev/null +++ b/everos_cloud/api_client.py @@ -0,0 +1,798 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from everos_cloud.configuration import Configuration +from everos_cloud.api_response import ApiResponse, T as ApiResponseT +import everos_cloud.models +from everos_cloud import rest +from everos_cloud.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0-rc1/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(everos_cloud.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/everos_cloud/api_response.py b/everos_cloud/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/everos_cloud/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/everos_cloud/configuration.py b/everos_cloud/configuration.py new file mode 100644 index 0000000..4aa8ec5 --- /dev/null +++ b/everos_cloud/configuration.py @@ -0,0 +1,575 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import http.client as httplib +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict +from typing_extensions import NotRequired, Self + +import urllib3 + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "BearerAuth": BearerAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + + :Example: + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.evermind.ai" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("everos_cloud") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 2.0.0\n"\ + "SDK Package Version: 1.0.0-rc1".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.evermind.ai", + 'description': "Production", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/everos_cloud/exceptions.py b/everos_cloud/exceptions.py new file mode 100644 index 0000000..4f80905 --- /dev/null +++ b/everos_cloud/exceptions.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/everos_cloud/models/__init__.py b/everos_cloud/models/__init__.py new file mode 100644 index 0000000..b588aff --- /dev/null +++ b/everos_cloud/models/__init__.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +# flake8: noqa +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from everos_cloud.models.add_data import AddData +from everos_cloud.models.add_input import AddInput +from everos_cloud.models.add_operation import AddOperation +from everos_cloud.models.agent_case_item import AgentCaseItem +from everos_cloud.models.agent_skill_item import AgentSkillItem +from everos_cloud.models.atomic_fact_item import AtomicFactItem +from everos_cloud.models.content import Content +from everos_cloud.models.content_item import ContentItem +from everos_cloud.models.data import Data +from everos_cloud.models.data1 import Data1 +from everos_cloud.models.delete_data import DeleteData +from everos_cloud.models.delete_input import DeleteInput +from everos_cloud.models.delete_operation import DeleteOperation +from everos_cloud.models.edit_data import EditData +from everos_cloud.models.edit_input import EditInput +from everos_cloud.models.edit_input_operations_inner import EditInputOperationsInner +from everos_cloud.models.edit_result_item import EditResultItem +from everos_cloud.models.envelope import Envelope +from everos_cloud.models.envelope_result import EnvelopeResult +from everos_cloud.models.episode_item import EpisodeItem +from everos_cloud.models.explicit_info_data import ExplicitInfoData +from everos_cloud.models.explicit_info_patch import ExplicitInfoPatch +from everos_cloud.models.filter_node import FilterNode +from everos_cloud.models.flush_data import FlushData +from everos_cloud.models.flush_input import FlushInput +from everos_cloud.models.get_data import GetData +from everos_cloud.models.get_input import GetInput +from everos_cloud.models.http_validation_error import HTTPValidationError +from everos_cloud.models.implicit_trait_data import ImplicitTraitData +from everos_cloud.models.implicit_trait_patch import ImplicitTraitPatch +from everos_cloud.models.message_item import MessageItem +from everos_cloud.models.profile_item import ProfileItem +from everos_cloud.models.search_agent_case_item import SearchAgentCaseItem +from everos_cloud.models.search_agent_skill_item import SearchAgentSkillItem +from everos_cloud.models.search_atomic_fact_item import SearchAtomicFactItem +from everos_cloud.models.search_data import SearchData +from everos_cloud.models.search_episode_item import SearchEpisodeItem +from everos_cloud.models.search_input import SearchInput +from everos_cloud.models.search_profile_item import SearchProfileItem +from everos_cloud.models.sign_envelope import SignEnvelope +from everos_cloud.models.sign_envelope_all_of_result import SignEnvelopeAllOfResult +from everos_cloud.models.sign_object_item import SignObjectItem +from everos_cloud.models.sign_request import SignRequest +from everos_cloud.models.sign_response import SignResponse +from everos_cloud.models.sign_response_item import SignResponseItem +from everos_cloud.models.signed_info import SignedInfo +from everos_cloud.models.success_envelope_add_data import SuccessEnvelopeAddData +from everos_cloud.models.success_envelope_delete_data import SuccessEnvelopeDeleteData +from everos_cloud.models.success_envelope_edit_data import SuccessEnvelopeEditData +from everos_cloud.models.success_envelope_flush_data import SuccessEnvelopeFlushData +from everos_cloud.models.success_envelope_get_data import SuccessEnvelopeGetData +from everos_cloud.models.success_envelope_search_data import SuccessEnvelopeSearchData +from everos_cloud.models.tool_call import ToolCall +from everos_cloud.models.tool_call_function import ToolCallFunction +from everos_cloud.models.unprocessed_message_dto import UnprocessedMessageDTO +from everos_cloud.models.update_operation import UpdateOperation +from everos_cloud.models.validation_error import ValidationError +from everos_cloud.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/everos_cloud/models/add_data.py b/everos_cloud/models/add_data.py new file mode 100644 index 0000000..d70abd2 --- /dev/null +++ b/everos_cloud/models/add_data.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AddData(BaseModel): + """ + AddData + """ # noqa: E501 + message_count: StrictInt + status: StrictStr = Field(description="\"queued\" — async enqueue accepted (HTTP 202). \"accumulated\"/\"extracted\" — synchronous write outcome (HTTP 200, async_mode=false).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message_count", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['accumulated', 'extracted', 'queued']): + raise ValueError("must be one of enum values ('accumulated', 'extracted', 'queued')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message_count": obj.get("message_count"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/add_input.py b/everos_cloud/models/add_input.py new file mode 100644 index 0000000..41e21e8 --- /dev/null +++ b/everos_cloud/models/add_input.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from everos_cloud.models.message_item import MessageItem +from typing import Optional, Set +from typing_extensions import Self + +class AddInput(BaseModel): + """ + AddInput + """ # noqa: E501 + app_id: Optional[StrictStr] = 'default' + project_id: Optional[StrictStr] = 'default' + session_id: Annotated[str, Field(min_length=1, strict=True, max_length=128)] + mode: Optional[StrictStr] = 'chat' + messages: Annotated[List[MessageItem], Field(min_length=1, max_length=500)] + async_mode: Optional[StrictBool] = Field(default=True, description="Selects the write path. true (default): validated and enqueued asynchronously → HTTP 202 with status \"queued\". false: forwarded synchronously to the engine, returning its 200 result and surfacing write errors directly. Extraction is always asynchronous (flush-triggered).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["app_id", "project_id", "session_id", "mode", "messages", "async_mode"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['chat', 'agent']): + raise ValueError("must be one of enum values ('chat', 'agent')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in messages (list) + _items = [] + if self.messages: + for _item_messages in self.messages: + if _item_messages: + _items.append(_item_messages.to_dict()) + _dict['messages'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "app_id": obj.get("app_id") if obj.get("app_id") is not None else 'default', + "project_id": obj.get("project_id") if obj.get("project_id") is not None else 'default', + "session_id": obj.get("session_id"), + "mode": obj.get("mode") if obj.get("mode") is not None else 'chat', + "messages": [MessageItem.from_dict(_item) for _item in obj["messages"]] if obj.get("messages") is not None else None, + "async_mode": obj.get("async_mode") if obj.get("async_mode") is not None else True + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/add_operation.py b/everos_cloud/models/add_operation.py new file mode 100644 index 0000000..34b121b --- /dev/null +++ b/everos_cloud/models/add_operation.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from everos_cloud.models.data import Data +from typing import Optional, Set +from typing_extensions import Self + +class AddOperation(BaseModel): + """ + Add a new profile item (``item_id`` forbidden — the server mints it). + """ # noqa: E501 + reason: Optional[Annotated[str, Field(strict=True, max_length=256)]] = None + action: StrictStr + type: StrictStr + data: Data + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reason", "action", "type", "data"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['add']): + raise ValueError("must be one of enum values ('add')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['explicit_info', 'implicit_traits']): + raise ValueError("must be one of enum values ('explicit_info', 'implicit_traits')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddOperation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if reason (nullable) is None + # and model_fields_set contains the field + if self.reason is None and "reason" in self.model_fields_set: + _dict['reason'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddOperation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reason": obj.get("reason"), + "action": obj.get("action"), + "type": obj.get("type"), + "data": Data.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/agent_case_item.py b/everos_cloud/models/agent_case_item.py new file mode 100644 index 0000000..ce809df --- /dev/null +++ b/everos_cloud/models/agent_case_item.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class AgentCaseItem(BaseModel): + """ + AgentCaseItem + """ # noqa: E501 + id: StrictStr + app_id: StrictStr + project_id: StrictStr + agent_id: StrictStr + session_id: StrictStr + task_intent: StrictStr + approach: StrictStr + quality_score: Union[StrictFloat, StrictInt] + key_insight: Optional[StrictStr] = None + timestamp: datetime + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "app_id", "project_id", "agent_id", "session_id", "task_intent", "approach", "quality_score", "key_insight", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentCaseItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if key_insight (nullable) is None + # and model_fields_set contains the field + if self.key_insight is None and "key_insight" in self.model_fields_set: + _dict['key_insight'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentCaseItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "app_id": obj.get("app_id"), + "project_id": obj.get("project_id"), + "agent_id": obj.get("agent_id"), + "session_id": obj.get("session_id"), + "task_intent": obj.get("task_intent"), + "approach": obj.get("approach"), + "quality_score": obj.get("quality_score"), + "key_insight": obj.get("key_insight"), + "timestamp": obj.get("timestamp") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/agent_skill_item.py b/everos_cloud/models/agent_skill_item.py new file mode 100644 index 0000000..40496cb --- /dev/null +++ b/everos_cloud/models/agent_skill_item.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class AgentSkillItem(BaseModel): + """ + AgentSkillItem + """ # noqa: E501 + id: StrictStr + app_id: StrictStr + project_id: StrictStr + agent_id: StrictStr + name: StrictStr + description: StrictStr + content: StrictStr + confidence: Union[StrictFloat, StrictInt] + maturity_score: Union[StrictFloat, StrictInt] + source_case_ids: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "app_id", "project_id", "agent_id", "name", "description", "content", "confidence", "maturity_score", "source_case_ids"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSkillItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSkillItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "app_id": obj.get("app_id"), + "project_id": obj.get("project_id"), + "agent_id": obj.get("agent_id"), + "name": obj.get("name"), + "description": obj.get("description"), + "content": obj.get("content"), + "confidence": obj.get("confidence"), + "maturity_score": obj.get("maturity_score"), + "source_case_ids": obj.get("source_case_ids") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/atomic_fact_item.py b/everos_cloud/models/atomic_fact_item.py new file mode 100644 index 0000000..86f4196 --- /dev/null +++ b/everos_cloud/models/atomic_fact_item.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AtomicFactItem(BaseModel): + """ + Atomic fact nested in an episode. Spec appendix E references it but does not enumerate its fields — minimal shape until the contract is detailed. + """ # noqa: E501 + id: StrictStr + content: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "content"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AtomicFactItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AtomicFactItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "content": obj.get("content") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/content.py b/everos_cloud/models/content.py new file mode 100644 index 0000000..4ae8f64 --- /dev/null +++ b/everos_cloud/models/content.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import List, Optional +from everos_cloud.models.content_item import ContentItem +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +CONTENT_ANY_OF_SCHEMAS = ["List[ContentItem]", "str"] + +class Content(BaseModel): + """ + Content + """ + + # data type: str + anyof_schema_1_validator: Optional[StrictStr] = None + # data type: List[ContentItem] + anyof_schema_2_validator: Optional[List[ContentItem]] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[List[ContentItem], str]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "List[ContentItem]", "str" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = Content.model_construct() + error_messages = [] + # validate data type: str + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[ContentItem] + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in Content with anyOf schemas: List[ContentItem], str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # deserialize data into str + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[ContentItem] + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into Content with anyOf schemas: List[ContentItem], str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], List[ContentItem], str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/everos_cloud/models/content_item.py b/everos_cloud/models/content_item.py new file mode 100644 index 0000000..f1fa244 --- /dev/null +++ b/everos_cloud/models/content_item.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ContentItem(BaseModel): + """ + A single content element (appendix A). Current phase: only ``type=\"text\"``. + """ # noqa: E501 + type: StrictStr + text: Optional[StrictStr] = None + source: Optional[StrictStr] = None + var_base64: Optional[StrictStr] = Field(default=None, alias="base64") + uri: Optional[StrictStr] = None + ext: Optional[StrictStr] = None + name: Optional[StrictStr] = None + source_info: Optional[Dict[str, Any]] = None + extras: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "text", "source", "base64", "uri", "ext", "name", "source_info", "extras"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['text', 'audio', 'image', 'doc', 'pdf', 'html', 'email']): + raise ValueError("must be one of enum values ('text', 'audio', 'image', 'doc', 'pdf', 'html', 'email')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ContentItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict['text'] = None + + # set to None if source (nullable) is None + # and model_fields_set contains the field + if self.source is None and "source" in self.model_fields_set: + _dict['source'] = None + + # set to None if var_base64 (nullable) is None + # and model_fields_set contains the field + if self.var_base64 is None and "var_base64" in self.model_fields_set: + _dict['base64'] = None + + # set to None if uri (nullable) is None + # and model_fields_set contains the field + if self.uri is None and "uri" in self.model_fields_set: + _dict['uri'] = None + + # set to None if ext (nullable) is None + # and model_fields_set contains the field + if self.ext is None and "ext" in self.model_fields_set: + _dict['ext'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if source_info (nullable) is None + # and model_fields_set contains the field + if self.source_info is None and "source_info" in self.model_fields_set: + _dict['source_info'] = None + + # set to None if extras (nullable) is None + # and model_fields_set contains the field + if self.extras is None and "extras" in self.model_fields_set: + _dict['extras'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ContentItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "text": obj.get("text"), + "source": obj.get("source"), + "base64": obj.get("base64"), + "uri": obj.get("uri"), + "ext": obj.get("ext"), + "name": obj.get("name"), + "source_info": obj.get("source_info"), + "extras": obj.get("extras") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/data.py b/everos_cloud/models/data.py new file mode 100644 index 0000000..5c81f0c --- /dev/null +++ b/everos_cloud/models/data.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from everos_cloud.models.explicit_info_data import ExplicitInfoData +from everos_cloud.models.implicit_trait_data import ImplicitTraitData +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +DATA_ANY_OF_SCHEMAS = ["ExplicitInfoData", "ImplicitTraitData"] + +class Data(BaseModel): + """ + Data + """ + + # data type: ExplicitInfoData + anyof_schema_1_validator: Optional[ExplicitInfoData] = None + # data type: ImplicitTraitData + anyof_schema_2_validator: Optional[ImplicitTraitData] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[ExplicitInfoData, ImplicitTraitData]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "ExplicitInfoData", "ImplicitTraitData" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = Data.model_construct() + error_messages = [] + # validate data type: ExplicitInfoData + if not isinstance(v, ExplicitInfoData): + error_messages.append(f"Error! Input type `{type(v)}` is not `ExplicitInfoData`") + else: + return v + + # validate data type: ImplicitTraitData + if not isinstance(v, ImplicitTraitData): + error_messages.append(f"Error! Input type `{type(v)}` is not `ImplicitTraitData`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in Data with anyOf schemas: ExplicitInfoData, ImplicitTraitData. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[ExplicitInfoData] = None + try: + instance.actual_instance = ExplicitInfoData.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[ImplicitTraitData] = None + try: + instance.actual_instance = ImplicitTraitData.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into Data with anyOf schemas: ExplicitInfoData, ImplicitTraitData. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ExplicitInfoData, ImplicitTraitData]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/everos_cloud/models/data1.py b/everos_cloud/models/data1.py new file mode 100644 index 0000000..c78317a --- /dev/null +++ b/everos_cloud/models/data1.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from everos_cloud.models.explicit_info_patch import ExplicitInfoPatch +from everos_cloud.models.implicit_trait_patch import ImplicitTraitPatch +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +DATA1_ANY_OF_SCHEMAS = ["ExplicitInfoPatch", "ImplicitTraitPatch"] + +class Data1(BaseModel): + """ + Data1 + """ + + # data type: ExplicitInfoPatch + anyof_schema_1_validator: Optional[ExplicitInfoPatch] = None + # data type: ImplicitTraitPatch + anyof_schema_2_validator: Optional[ImplicitTraitPatch] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[ExplicitInfoPatch, ImplicitTraitPatch]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "ExplicitInfoPatch", "ImplicitTraitPatch" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = Data1.model_construct() + error_messages = [] + # validate data type: ExplicitInfoPatch + if not isinstance(v, ExplicitInfoPatch): + error_messages.append(f"Error! Input type `{type(v)}` is not `ExplicitInfoPatch`") + else: + return v + + # validate data type: ImplicitTraitPatch + if not isinstance(v, ImplicitTraitPatch): + error_messages.append(f"Error! Input type `{type(v)}` is not `ImplicitTraitPatch`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in Data1 with anyOf schemas: ExplicitInfoPatch, ImplicitTraitPatch. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[ExplicitInfoPatch] = None + try: + instance.actual_instance = ExplicitInfoPatch.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[ImplicitTraitPatch] = None + try: + instance.actual_instance = ImplicitTraitPatch.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into Data1 with anyOf schemas: ExplicitInfoPatch, ImplicitTraitPatch. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ExplicitInfoPatch, ImplicitTraitPatch]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/everos_cloud/models/delete_data.py b/everos_cloud/models/delete_data.py new file mode 100644 index 0000000..0e4a0b8 --- /dev/null +++ b/everos_cloud/models/delete_data.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DeleteData(BaseModel): + """ + Delete result (mirrors v1 ``DeleteMemoriesResult``): which scope filters were applied + how many mongo records were soft-deleted across all memory types. + """ # noqa: E501 + filters: Optional[List[StrictStr]] = Field(default=None, description="Scope filters used, e.g. ['user_id'] or ['user_id', 'session_id']") + count: Optional[StrictInt] = Field(default=0, description="Total memory records soft-deleted") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["filters", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filters": obj.get("filters"), + "count": obj.get("count") if obj.get("count") is not None else 0 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/delete_input.py b/everos_cloud/models/delete_input.py new file mode 100644 index 0000000..6a95a96 --- /dev/null +++ b/everos_cloud/models/delete_input.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeleteInput(BaseModel): + """ + DeleteInput + """ # noqa: E501 + app_id: Optional[StrictStr] = 'default' + project_id: Optional[StrictStr] = 'default' + user_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + agent_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + session_id: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["app_id", "project_id", "user_id", "agent_id", "session_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['user_id'] = None + + # set to None if agent_id (nullable) is None + # and model_fields_set contains the field + if self.agent_id is None and "agent_id" in self.model_fields_set: + _dict['agent_id'] = None + + # set to None if session_id (nullable) is None + # and model_fields_set contains the field + if self.session_id is None and "session_id" in self.model_fields_set: + _dict['session_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "app_id": obj.get("app_id") if obj.get("app_id") is not None else 'default', + "project_id": obj.get("project_id") if obj.get("project_id") is not None else 'default', + "user_id": obj.get("user_id"), + "agent_id": obj.get("agent_id"), + "session_id": obj.get("session_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/delete_operation.py b/everos_cloud/models/delete_operation.py new file mode 100644 index 0000000..41156c3 --- /dev/null +++ b/everos_cloud/models/delete_operation.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeleteOperation(BaseModel): + """ + Delete an existing profile item by ``item_id`` (carries no ``data``). + """ # noqa: E501 + reason: Optional[Annotated[str, Field(strict=True, max_length=256)]] = None + action: StrictStr + type: StrictStr + item_id: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reason", "action", "type", "item_id"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['delete']): + raise ValueError("must be one of enum values ('delete')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['explicit_info', 'implicit_traits']): + raise ValueError("must be one of enum values ('explicit_info', 'implicit_traits')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteOperation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if reason (nullable) is None + # and model_fields_set contains the field + if self.reason is None and "reason" in self.model_fields_set: + _dict['reason'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteOperation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reason": obj.get("reason"), + "action": obj.get("action"), + "type": obj.get("type"), + "item_id": obj.get("item_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/edit_data.py b/everos_cloud/models/edit_data.py new file mode 100644 index 0000000..9ce794c --- /dev/null +++ b/everos_cloud/models/edit_data.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.edit_result_item import EditResultItem +from typing import Optional, Set +from typing_extensions import Self + +class EditData(BaseModel): + """ + Response payload for a successful profile edit request. + """ # noqa: E501 + user_id: StrictStr + version: StrictInt + applied: StrictInt + results: Optional[List[EditResultItem]] = None + profile: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user_id", "version", "applied", "results", "profile"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EditData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EditData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user_id": obj.get("user_id"), + "version": obj.get("version"), + "applied": obj.get("applied"), + "results": [EditResultItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "profile": obj.get("profile") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/edit_input.py b/everos_cloud/models/edit_input.py new file mode 100644 index 0000000..863fb0d --- /dev/null +++ b/everos_cloud/models/edit_input.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from everos_cloud.models.edit_input_operations_inner import EditInputOperationsInner +from typing import Optional, Set +from typing_extensions import Self + +class EditInput(BaseModel): + """ + Bulk profile edit request [Cloud-only]. Carries 1–50 ``EditOperation`` items targeting a single user's profile. ``memory_type`` is pinned to ``\"profile\"``; ``source`` is server-set and not accepted from the client. + """ # noqa: E501 + app_id: Optional[StrictStr] = 'default' + project_id: Optional[StrictStr] = 'default' + user_id: Annotated[str, Field(min_length=1, strict=True)] + memory_type: Optional[StrictStr] = 'profile' + operations: Annotated[List[EditInputOperationsInner], Field(min_length=1, max_length=50)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["app_id", "project_id", "user_id", "memory_type", "operations"] + + @field_validator('memory_type') + def memory_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['profile']): + raise ValueError("must be one of enum values ('profile')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EditInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in operations (list) + _items = [] + if self.operations: + for _item_operations in self.operations: + if _item_operations: + _items.append(_item_operations.to_dict()) + _dict['operations'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EditInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "app_id": obj.get("app_id") if obj.get("app_id") is not None else 'default', + "project_id": obj.get("project_id") if obj.get("project_id") is not None else 'default', + "user_id": obj.get("user_id"), + "memory_type": obj.get("memory_type") if obj.get("memory_type") is not None else 'profile', + "operations": [EditInputOperationsInner.from_dict(_item) for _item in obj["operations"]] if obj.get("operations") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/edit_input_operations_inner.py b/everos_cloud/models/edit_input_operations_inner.py new file mode 100644 index 0000000..80970cc --- /dev/null +++ b/everos_cloud/models/edit_input_operations_inner.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from everos_cloud.models.add_operation import AddOperation +from everos_cloud.models.delete_operation import DeleteOperation +from everos_cloud.models.update_operation import UpdateOperation +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +EDITINPUTOPERATIONSINNER_ONE_OF_SCHEMAS = ["AddOperation", "DeleteOperation", "UpdateOperation"] + +class EditInputOperationsInner(BaseModel): + """ + EditInputOperationsInner + """ + # data type: AddOperation + oneof_schema_1_validator: Optional[AddOperation] = None + # data type: UpdateOperation + oneof_schema_2_validator: Optional[UpdateOperation] = None + # data type: DeleteOperation + oneof_schema_3_validator: Optional[DeleteOperation] = None + actual_instance: Optional[Union[AddOperation, DeleteOperation, UpdateOperation]] = None + one_of_schemas: Set[str] = { "AddOperation", "DeleteOperation", "UpdateOperation" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = EditInputOperationsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: AddOperation + if not isinstance(v, AddOperation): + error_messages.append(f"Error! Input type `{type(v)}` is not `AddOperation`") + else: + match += 1 + # validate data type: UpdateOperation + if not isinstance(v, UpdateOperation): + error_messages.append(f"Error! Input type `{type(v)}` is not `UpdateOperation`") + else: + match += 1 + # validate data type: DeleteOperation + if not isinstance(v, DeleteOperation): + error_messages.append(f"Error! Input type `{type(v)}` is not `DeleteOperation`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in EditInputOperationsInner with oneOf schemas: AddOperation, DeleteOperation, UpdateOperation. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in EditInputOperationsInner with oneOf schemas: AddOperation, DeleteOperation, UpdateOperation. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("action") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `action` in the input.") + + # check if data type is `AddOperation` + if _data_type == "add": + instance.actual_instance = AddOperation.from_json(json_str) + return instance + + # check if data type is `DeleteOperation` + if _data_type == "delete": + instance.actual_instance = DeleteOperation.from_json(json_str) + return instance + + # check if data type is `UpdateOperation` + if _data_type == "update": + instance.actual_instance = UpdateOperation.from_json(json_str) + return instance + + # check if data type is `AddOperation` + if _data_type == "AddOperation": + instance.actual_instance = AddOperation.from_json(json_str) + return instance + + # check if data type is `DeleteOperation` + if _data_type == "DeleteOperation": + instance.actual_instance = DeleteOperation.from_json(json_str) + return instance + + # check if data type is `UpdateOperation` + if _data_type == "UpdateOperation": + instance.actual_instance = UpdateOperation.from_json(json_str) + return instance + + # deserialize data into AddOperation + try: + instance.actual_instance = AddOperation.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UpdateOperation + try: + instance.actual_instance = UpdateOperation.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DeleteOperation + try: + instance.actual_instance = DeleteOperation.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into EditInputOperationsInner with oneOf schemas: AddOperation, DeleteOperation, UpdateOperation. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into EditInputOperationsInner with oneOf schemas: AddOperation, DeleteOperation, UpdateOperation. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AddOperation, DeleteOperation, UpdateOperation]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/everos_cloud/models/edit_result_item.py b/everos_cloud/models/edit_result_item.py new file mode 100644 index 0000000..91bfb58 --- /dev/null +++ b/everos_cloud/models/edit_result_item.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EditResultItem(BaseModel): + """ + Per-operation outcome returned in ``EditData.results``. + """ # noqa: E501 + op_index: StrictInt + action: StrictStr + type: StrictStr + status: StrictStr + item_id: Optional[StrictStr] = None + new_item_id: Optional[StrictStr] = None + error: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["op_index", "action", "type", "status", "item_id", "new_item_id", "error"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['applied', 'rejected']): + raise ValueError("must be one of enum values ('applied', 'rejected')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EditResultItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if item_id (nullable) is None + # and model_fields_set contains the field + if self.item_id is None and "item_id" in self.model_fields_set: + _dict['item_id'] = None + + # set to None if new_item_id (nullable) is None + # and model_fields_set contains the field + if self.new_item_id is None and "new_item_id" in self.model_fields_set: + _dict['new_item_id'] = None + + # set to None if error (nullable) is None + # and model_fields_set contains the field + if self.error is None and "error" in self.model_fields_set: + _dict['error'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EditResultItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "op_index": obj.get("op_index"), + "action": obj.get("action"), + "type": obj.get("type"), + "status": obj.get("status"), + "item_id": obj.get("item_id"), + "new_item_id": obj.get("new_item_id"), + "error": obj.get("error") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/envelope.py b/everos_cloud/models/envelope.py new file mode 100644 index 0000000..9ddaa95 --- /dev/null +++ b/everos_cloud/models/envelope.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.envelope_result import EnvelopeResult +from typing import Optional, Set +from typing_extensions import Self + +class Envelope(BaseModel): + """ + Common response envelope + """ # noqa: E501 + error: Optional[StrictStr] = Field(default=None, description="`\"OK\"` on success, otherwise a human-readable error message decoded from the business error. ") + request_id: Optional[StrictStr] = None + status: Optional[StrictInt] = Field(default=None, description="Business status code; 0 means success") + result: Optional[EnvelopeResult] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "request_id", "status", "result"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Envelope from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of result + if self.result: + _dict['result'] = self.result.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Envelope from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "request_id": obj.get("request_id"), + "status": obj.get("status"), + "result": EnvelopeResult.from_dict(obj["result"]) if obj.get("result") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/envelope_result.py b/everos_cloud/models/envelope_result.py new file mode 100644 index 0000000..052c6b6 --- /dev/null +++ b/everos_cloud/models/envelope_result.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EnvelopeResult(BaseModel): + """ + EnvelopeResult + """ # noqa: E501 + data: Optional[Any] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnvelopeResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnvelopeResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": obj.get("data") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/episode_item.py b/everos_cloud/models/episode_item.py new file mode 100644 index 0000000..73797df --- /dev/null +++ b/everos_cloud/models/episode_item.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.atomic_fact_item import AtomicFactItem +from typing import Optional, Set +from typing_extensions import Self + +class EpisodeItem(BaseModel): + """ + EpisodeItem + """ # noqa: E501 + id: StrictStr + app_id: StrictStr + project_id: StrictStr + user_id: Optional[StrictStr] = None + session_id: Optional[StrictStr] = None + timestamp: datetime + sender_ids: Optional[List[StrictStr]] = None + summary: StrictStr + subject: StrictStr + episode: StrictStr + type: StrictStr + atomic_facts: Optional[List[AtomicFactItem]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "app_id", "project_id", "user_id", "session_id", "timestamp", "sender_ids", "summary", "subject", "episode", "type", "atomic_facts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EpisodeItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in atomic_facts (list) + _items = [] + if self.atomic_facts: + for _item_atomic_facts in self.atomic_facts: + if _item_atomic_facts: + _items.append(_item_atomic_facts.to_dict()) + _dict['atomic_facts'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['user_id'] = None + + # set to None if session_id (nullable) is None + # and model_fields_set contains the field + if self.session_id is None and "session_id" in self.model_fields_set: + _dict['session_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EpisodeItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "app_id": obj.get("app_id"), + "project_id": obj.get("project_id"), + "user_id": obj.get("user_id"), + "session_id": obj.get("session_id"), + "timestamp": obj.get("timestamp"), + "sender_ids": obj.get("sender_ids"), + "summary": obj.get("summary"), + "subject": obj.get("subject"), + "episode": obj.get("episode"), + "type": obj.get("type"), + "atomic_facts": [AtomicFactItem.from_dict(_item) for _item in obj["atomic_facts"]] if obj.get("atomic_facts") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/explicit_info_data.py b/everos_cloud/models/explicit_info_data.py new file mode 100644 index 0000000..189ca4a --- /dev/null +++ b/everos_cloud/models/explicit_info_data.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ExplicitInfoData(BaseModel): + """ + ``data`` payload for ``add explicit_info`` — ``category`` + ``description`` required (non-empty); other fields (``evidence``, ``sources``, …) pass through. + """ # noqa: E501 + category: Annotated[str, Field(min_length=1, strict=True)] + description: Annotated[str, Field(min_length=1, strict=True, max_length=4000)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["category", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExplicitInfoData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExplicitInfoData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "category": obj.get("category"), + "description": obj.get("description") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/explicit_info_patch.py b/everos_cloud/models/explicit_info_patch.py new file mode 100644 index 0000000..777f044 --- /dev/null +++ b/everos_cloud/models/explicit_info_patch.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ExplicitInfoPatch(BaseModel): + """ + ``data`` payload for ``update explicit_info`` — partial; at least one of ``category`` / ``description`` (non-empty if present); others pass through. + """ # noqa: E501 + category: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + description: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=4000)]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["category", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExplicitInfoPatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if category (nullable) is None + # and model_fields_set contains the field + if self.category is None and "category" in self.model_fields_set: + _dict['category'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExplicitInfoPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "category": obj.get("category"), + "description": obj.get("description") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/filter_node.py b/everos_cloud/models/filter_node.py new file mode 100644 index 0000000..9509b11 --- /dev/null +++ b/everos_cloud/models/filter_node.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FilterNode(BaseModel): + """ + One Filters DSL node — recursive ``AND`` / ``OR`` arrays plus arbitrary scalar field conditions at the same level. + """ # noqa: E501 + var_and: Optional[List[FilterNode]] = Field(default=None, alias="AND") + var_or: Optional[List[FilterNode]] = Field(default=None, alias="OR") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["AND", "OR"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilterNode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in var_and (list) + _items = [] + if self.var_and: + for _item_var_and in self.var_and: + if _item_var_and: + _items.append(_item_var_and.to_dict()) + _dict['AND'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in var_or (list) + _items = [] + if self.var_or: + for _item_var_or in self.var_or: + if _item_var_or: + _items.append(_item_var_or.to_dict()) + _dict['OR'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if var_and (nullable) is None + # and model_fields_set contains the field + if self.var_and is None and "var_and" in self.model_fields_set: + _dict['AND'] = None + + # set to None if var_or (nullable) is None + # and model_fields_set contains the field + if self.var_or is None and "var_or" in self.model_fields_set: + _dict['OR'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilterNode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "AND": [FilterNode.from_dict(_item) for _item in obj["AND"]] if obj.get("AND") is not None else None, + "OR": [FilterNode.from_dict(_item) for _item in obj["OR"]] if obj.get("OR") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + +# TODO: Rewrite to not use raise_errors +FilterNode.model_rebuild(raise_errors=False) + diff --git a/everos_cloud/models/flush_data.py b/everos_cloud/models/flush_data.py new file mode 100644 index 0000000..e4f7aa1 --- /dev/null +++ b/everos_cloud/models/flush_data.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FlushData(BaseModel): + """ + FlushData + """ # noqa: E501 + status: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['extracted', 'no_extraction']): + raise ValueError("must be one of enum values ('extracted', 'no_extraction')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlushData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlushData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/flush_input.py b/everos_cloud/models/flush_input.py new file mode 100644 index 0000000..701e6eb --- /dev/null +++ b/everos_cloud/models/flush_input.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class FlushInput(BaseModel): + """ + FlushInput + """ # noqa: E501 + app_id: Optional[StrictStr] = 'default' + project_id: Optional[StrictStr] = 'default' + session_id: Annotated[str, Field(min_length=1, strict=True)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["app_id", "project_id", "session_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlushInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlushInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "app_id": obj.get("app_id") if obj.get("app_id") is not None else 'default', + "project_id": obj.get("project_id") if obj.get("project_id") is not None else 'default', + "session_id": obj.get("session_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/get_data.py b/everos_cloud/models/get_data.py new file mode 100644 index 0000000..110c59b --- /dev/null +++ b/everos_cloud/models/get_data.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.agent_case_item import AgentCaseItem +from everos_cloud.models.agent_skill_item import AgentSkillItem +from everos_cloud.models.episode_item import EpisodeItem +from everos_cloud.models.profile_item import ProfileItem +from typing import Optional, Set +from typing_extensions import Self + +class GetData(BaseModel): + """ + GetData + """ # noqa: E501 + episodes: Optional[List[EpisodeItem]] = None + profiles: Optional[List[ProfileItem]] = None + agent_cases: Optional[List[AgentCaseItem]] = None + agent_skills: Optional[List[AgentSkillItem]] = None + total_count: Optional[StrictInt] = 0 + count: Optional[StrictInt] = 0 + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["episodes", "profiles", "agent_cases", "agent_skills", "total_count", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in episodes (list) + _items = [] + if self.episodes: + for _item_episodes in self.episodes: + if _item_episodes: + _items.append(_item_episodes.to_dict()) + _dict['episodes'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in profiles (list) + _items = [] + if self.profiles: + for _item_profiles in self.profiles: + if _item_profiles: + _items.append(_item_profiles.to_dict()) + _dict['profiles'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in agent_cases (list) + _items = [] + if self.agent_cases: + for _item_agent_cases in self.agent_cases: + if _item_agent_cases: + _items.append(_item_agent_cases.to_dict()) + _dict['agent_cases'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in agent_skills (list) + _items = [] + if self.agent_skills: + for _item_agent_skills in self.agent_skills: + if _item_agent_skills: + _items.append(_item_agent_skills.to_dict()) + _dict['agent_skills'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "episodes": [EpisodeItem.from_dict(_item) for _item in obj["episodes"]] if obj.get("episodes") is not None else None, + "profiles": [ProfileItem.from_dict(_item) for _item in obj["profiles"]] if obj.get("profiles") is not None else None, + "agent_cases": [AgentCaseItem.from_dict(_item) for _item in obj["agent_cases"]] if obj.get("agent_cases") is not None else None, + "agent_skills": [AgentSkillItem.from_dict(_item) for _item in obj["agent_skills"]] if obj.get("agent_skills") is not None else None, + "total_count": obj.get("total_count") if obj.get("total_count") is not None else 0, + "count": obj.get("count") if obj.get("count") is not None else 0 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/get_input.py b/everos_cloud/models/get_input.py new file mode 100644 index 0000000..0323f69 --- /dev/null +++ b/everos_cloud/models/get_input.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from everos_cloud.models.filter_node import FilterNode +from typing import Optional, Set +from typing_extensions import Self + +class GetInput(BaseModel): + """ + GetInput + """ # noqa: E501 + app_id: Optional[StrictStr] = 'default' + project_id: Optional[StrictStr] = 'default' + user_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + agent_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + memory_type: StrictStr + page: Optional[Annotated[int, Field(strict=True, ge=1)]] = 1 + page_size: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = 20 + sort_by: Optional[StrictStr] = 'timestamp' + sort_order: Optional[StrictStr] = 'desc' + filters: Optional[FilterNode] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["app_id", "project_id", "user_id", "agent_id", "memory_type", "page", "page_size", "sort_by", "sort_order", "filters"] + + @field_validator('memory_type') + def memory_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['episode', 'profile', 'agent_case', 'agent_skill']): + raise ValueError("must be one of enum values ('episode', 'profile', 'agent_case', 'agent_skill')") + return value + + @field_validator('sort_by') + def sort_by_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['timestamp', 'updated_at']): + raise ValueError("must be one of enum values ('timestamp', 'updated_at')") + return value + + @field_validator('sort_order') + def sort_order_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['asc', 'desc']): + raise ValueError("must be one of enum values ('asc', 'desc')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of filters + if self.filters: + _dict['filters'] = self.filters.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['user_id'] = None + + # set to None if agent_id (nullable) is None + # and model_fields_set contains the field + if self.agent_id is None and "agent_id" in self.model_fields_set: + _dict['agent_id'] = None + + # set to None if filters (nullable) is None + # and model_fields_set contains the field + if self.filters is None and "filters" in self.model_fields_set: + _dict['filters'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "app_id": obj.get("app_id") if obj.get("app_id") is not None else 'default', + "project_id": obj.get("project_id") if obj.get("project_id") is not None else 'default', + "user_id": obj.get("user_id"), + "agent_id": obj.get("agent_id"), + "memory_type": obj.get("memory_type"), + "page": obj.get("page") if obj.get("page") is not None else 1, + "page_size": obj.get("page_size") if obj.get("page_size") is not None else 20, + "sort_by": obj.get("sort_by") if obj.get("sort_by") is not None else 'timestamp', + "sort_order": obj.get("sort_order") if obj.get("sort_order") is not None else 'desc', + "filters": FilterNode.from_dict(obj["filters"]) if obj.get("filters") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/http_validation_error.py b/everos_cloud/models/http_validation_error.py new file mode 100644 index 0000000..1104446 --- /dev/null +++ b/everos_cloud/models/http_validation_error.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.validation_error import ValidationError +from typing import Optional, Set +from typing_extensions import Self + +class HTTPValidationError(BaseModel): + """ + HTTPValidationError + """ # noqa: E501 + detail: Optional[List[ValidationError]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["detail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HTTPValidationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in detail (list) + _items = [] + if self.detail: + for _item_detail in self.detail: + if _item_detail: + _items.append(_item_detail.to_dict()) + _dict['detail'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HTTPValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "detail": [ValidationError.from_dict(_item) for _item in obj["detail"]] if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/implicit_trait_data.py b/everos_cloud/models/implicit_trait_data.py new file mode 100644 index 0000000..414440a --- /dev/null +++ b/everos_cloud/models/implicit_trait_data.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ImplicitTraitData(BaseModel): + """ + ``data`` payload for ``add implicit_traits`` — ``trait`` + ``description`` required (non-empty); other fields (``basis``, ``evidence``, ``sources``, …) pass through. + """ # noqa: E501 + trait: Annotated[str, Field(min_length=1, strict=True)] + description: Annotated[str, Field(min_length=1, strict=True, max_length=4000)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["trait", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImplicitTraitData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImplicitTraitData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "trait": obj.get("trait"), + "description": obj.get("description") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/implicit_trait_patch.py b/everos_cloud/models/implicit_trait_patch.py new file mode 100644 index 0000000..b40c77e --- /dev/null +++ b/everos_cloud/models/implicit_trait_patch.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ImplicitTraitPatch(BaseModel): + """ + ``data`` payload for ``update implicit_traits`` — partial; at least one of ``trait`` / ``description`` (non-empty if present); others pass through. + """ # noqa: E501 + trait: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + description: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=4000)]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["trait", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImplicitTraitPatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if trait (nullable) is None + # and model_fields_set contains the field + if self.trait is None and "trait" in self.model_fields_set: + _dict['trait'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImplicitTraitPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "trait": obj.get("trait"), + "description": obj.get("description") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/message_item.py b/everos_cloud/models/message_item.py new file mode 100644 index 0000000..220f9e4 --- /dev/null +++ b/everos_cloud/models/message_item.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.content import Content +from everos_cloud.models.tool_call import ToolCall +from typing import Optional, Set +from typing_extensions import Self + +class MessageItem(BaseModel): + """ + One message in an /add batch (spec §2). ``content`` accepts a plain string (shorthand for a single text ContentItem) or an explicit ContentItem list. + """ # noqa: E501 + sender_id: StrictStr + sender_name: Optional[StrictStr] = None + role: StrictStr + timestamp: StrictInt + content: Content + tool_calls: Optional[List[ToolCall]] = None + tool_call_id: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sender_id", "sender_name", "role", "timestamp", "content", "tool_calls", "tool_call_id"] + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'assistant', 'tool']): + raise ValueError("must be one of enum values ('user', 'assistant', 'tool')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in tool_calls (list) + _items = [] + if self.tool_calls: + for _item_tool_calls in self.tool_calls: + if _item_tool_calls: + _items.append(_item_tool_calls.to_dict()) + _dict['tool_calls'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if sender_name (nullable) is None + # and model_fields_set contains the field + if self.sender_name is None and "sender_name" in self.model_fields_set: + _dict['sender_name'] = None + + # set to None if tool_calls (nullable) is None + # and model_fields_set contains the field + if self.tool_calls is None and "tool_calls" in self.model_fields_set: + _dict['tool_calls'] = None + + # set to None if tool_call_id (nullable) is None + # and model_fields_set contains the field + if self.tool_call_id is None and "tool_call_id" in self.model_fields_set: + _dict['tool_call_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sender_id": obj.get("sender_id"), + "sender_name": obj.get("sender_name"), + "role": obj.get("role"), + "timestamp": obj.get("timestamp"), + "content": Content.from_dict(obj["content"]) if obj.get("content") is not None else None, + "tool_calls": [ToolCall.from_dict(_item) for _item in obj["tool_calls"]] if obj.get("tool_calls") is not None else None, + "tool_call_id": obj.get("tool_call_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/profile_item.py b/everos_cloud/models/profile_item.py new file mode 100644 index 0000000..858072a --- /dev/null +++ b/everos_cloud/models/profile_item.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ProfileItem(BaseModel): + """ + ProfileItem + """ # noqa: E501 + id: StrictStr + app_id: StrictStr + project_id: StrictStr + user_id: StrictStr + profile_data: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "app_id", "project_id", "user_id", "profile_data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProfileItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProfileItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "app_id": obj.get("app_id"), + "project_id": obj.get("project_id"), + "user_id": obj.get("user_id"), + "profile_data": obj.get("profile_data") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/search_agent_case_item.py b/everos_cloud/models/search_agent_case_item.py new file mode 100644 index 0000000..53cf184 --- /dev/null +++ b/everos_cloud/models/search_agent_case_item.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SearchAgentCaseItem(BaseModel): + """ + SearchAgentCaseItem + """ # noqa: E501 + id: StrictStr + app_id: StrictStr + project_id: StrictStr + agent_id: StrictStr + session_id: StrictStr + task_intent: StrictStr + approach: StrictStr + quality_score: Union[StrictFloat, StrictInt] + key_insight: Optional[StrictStr] = None + timestamp: datetime + score: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "app_id", "project_id", "agent_id", "session_id", "task_intent", "approach", "quality_score", "key_insight", "timestamp", "score"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchAgentCaseItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if key_insight (nullable) is None + # and model_fields_set contains the field + if self.key_insight is None and "key_insight" in self.model_fields_set: + _dict['key_insight'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchAgentCaseItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "app_id": obj.get("app_id"), + "project_id": obj.get("project_id"), + "agent_id": obj.get("agent_id"), + "session_id": obj.get("session_id"), + "task_intent": obj.get("task_intent"), + "approach": obj.get("approach"), + "quality_score": obj.get("quality_score"), + "key_insight": obj.get("key_insight"), + "timestamp": obj.get("timestamp"), + "score": obj.get("score") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/search_agent_skill_item.py b/everos_cloud/models/search_agent_skill_item.py new file mode 100644 index 0000000..0473463 --- /dev/null +++ b/everos_cloud/models/search_agent_skill_item.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SearchAgentSkillItem(BaseModel): + """ + SearchAgentSkillItem + """ # noqa: E501 + id: StrictStr + app_id: StrictStr + project_id: StrictStr + agent_id: StrictStr + name: StrictStr + description: StrictStr + content: StrictStr + confidence: Union[StrictFloat, StrictInt] + maturity_score: Union[StrictFloat, StrictInt] + source_case_ids: Optional[List[StrictStr]] = None + score: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "app_id", "project_id", "agent_id", "name", "description", "content", "confidence", "maturity_score", "source_case_ids", "score"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchAgentSkillItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchAgentSkillItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "app_id": obj.get("app_id"), + "project_id": obj.get("project_id"), + "agent_id": obj.get("agent_id"), + "name": obj.get("name"), + "description": obj.get("description"), + "content": obj.get("content"), + "confidence": obj.get("confidence"), + "maturity_score": obj.get("maturity_score"), + "source_case_ids": obj.get("source_case_ids"), + "score": obj.get("score") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/search_atomic_fact_item.py b/everos_cloud/models/search_atomic_fact_item.py new file mode 100644 index 0000000..230de5b --- /dev/null +++ b/everos_cloud/models/search_atomic_fact_item.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SearchAtomicFactItem(BaseModel): + """ + SearchAtomicFactItem + """ # noqa: E501 + id: StrictStr + content: StrictStr + score: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "content", "score"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchAtomicFactItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchAtomicFactItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "content": obj.get("content"), + "score": obj.get("score") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/search_data.py b/everos_cloud/models/search_data.py new file mode 100644 index 0000000..3bbe99d --- /dev/null +++ b/everos_cloud/models/search_data.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.search_agent_case_item import SearchAgentCaseItem +from everos_cloud.models.search_agent_skill_item import SearchAgentSkillItem +from everos_cloud.models.search_episode_item import SearchEpisodeItem +from everos_cloud.models.search_profile_item import SearchProfileItem +from everos_cloud.models.unprocessed_message_dto import UnprocessedMessageDTO +from typing import Optional, Set +from typing_extensions import Self + +class SearchData(BaseModel): + """ + SearchData + """ # noqa: E501 + episodes: Optional[List[SearchEpisodeItem]] = None + profiles: Optional[List[SearchProfileItem]] = None + agent_cases: Optional[List[SearchAgentCaseItem]] = None + agent_skills: Optional[List[SearchAgentSkillItem]] = None + unprocessed_messages: Optional[List[UnprocessedMessageDTO]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["episodes", "profiles", "agent_cases", "agent_skills", "unprocessed_messages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in episodes (list) + _items = [] + if self.episodes: + for _item_episodes in self.episodes: + if _item_episodes: + _items.append(_item_episodes.to_dict()) + _dict['episodes'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in profiles (list) + _items = [] + if self.profiles: + for _item_profiles in self.profiles: + if _item_profiles: + _items.append(_item_profiles.to_dict()) + _dict['profiles'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in agent_cases (list) + _items = [] + if self.agent_cases: + for _item_agent_cases in self.agent_cases: + if _item_agent_cases: + _items.append(_item_agent_cases.to_dict()) + _dict['agent_cases'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in agent_skills (list) + _items = [] + if self.agent_skills: + for _item_agent_skills in self.agent_skills: + if _item_agent_skills: + _items.append(_item_agent_skills.to_dict()) + _dict['agent_skills'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in unprocessed_messages (list) + _items = [] + if self.unprocessed_messages: + for _item_unprocessed_messages in self.unprocessed_messages: + if _item_unprocessed_messages: + _items.append(_item_unprocessed_messages.to_dict()) + _dict['unprocessed_messages'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "episodes": [SearchEpisodeItem.from_dict(_item) for _item in obj["episodes"]] if obj.get("episodes") is not None else None, + "profiles": [SearchProfileItem.from_dict(_item) for _item in obj["profiles"]] if obj.get("profiles") is not None else None, + "agent_cases": [SearchAgentCaseItem.from_dict(_item) for _item in obj["agent_cases"]] if obj.get("agent_cases") is not None else None, + "agent_skills": [SearchAgentSkillItem.from_dict(_item) for _item in obj["agent_skills"]] if obj.get("agent_skills") is not None else None, + "unprocessed_messages": [UnprocessedMessageDTO.from_dict(_item) for _item in obj["unprocessed_messages"]] if obj.get("unprocessed_messages") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/search_episode_item.py b/everos_cloud/models/search_episode_item.py new file mode 100644 index 0000000..d14940b --- /dev/null +++ b/everos_cloud/models/search_episode_item.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from everos_cloud.models.search_atomic_fact_item import SearchAtomicFactItem +from typing import Optional, Set +from typing_extensions import Self + +class SearchEpisodeItem(BaseModel): + """ + SearchEpisodeItem + """ # noqa: E501 + id: StrictStr + app_id: StrictStr + project_id: StrictStr + user_id: Optional[StrictStr] = None + session_id: Optional[StrictStr] = None + timestamp: datetime + sender_ids: Optional[List[StrictStr]] = None + summary: StrictStr + subject: StrictStr + episode: StrictStr + type: StrictStr + atomic_facts: Optional[List[SearchAtomicFactItem]] = None + score: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "app_id", "project_id", "user_id", "session_id", "timestamp", "sender_ids", "summary", "subject", "episode", "type", "atomic_facts", "score"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchEpisodeItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in atomic_facts (list) + _items = [] + if self.atomic_facts: + for _item_atomic_facts in self.atomic_facts: + if _item_atomic_facts: + _items.append(_item_atomic_facts.to_dict()) + _dict['atomic_facts'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['user_id'] = None + + # set to None if session_id (nullable) is None + # and model_fields_set contains the field + if self.session_id is None and "session_id" in self.model_fields_set: + _dict['session_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchEpisodeItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "app_id": obj.get("app_id"), + "project_id": obj.get("project_id"), + "user_id": obj.get("user_id"), + "session_id": obj.get("session_id"), + "timestamp": obj.get("timestamp"), + "sender_ids": obj.get("sender_ids"), + "summary": obj.get("summary"), + "subject": obj.get("subject"), + "episode": obj.get("episode"), + "type": obj.get("type"), + "atomic_facts": [SearchAtomicFactItem.from_dict(_item) for _item in obj["atomic_facts"]] if obj.get("atomic_facts") is not None else None, + "score": obj.get("score") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/search_input.py b/everos_cloud/models/search_input.py new file mode 100644 index 0000000..5282f15 --- /dev/null +++ b/everos_cloud/models/search_input.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from everos_cloud.models.filter_node import FilterNode +from typing import Optional, Set +from typing_extensions import Self + +class SearchInput(BaseModel): + """ + SearchInput + """ # noqa: E501 + app_id: Optional[StrictStr] = 'default' + project_id: Optional[StrictStr] = 'default' + user_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + agent_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + query: Annotated[str, Field(min_length=1, strict=True)] + method: Optional[StrictStr] = 'hybrid' + top_k: Optional[StrictInt] = -1 + radius: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None + min_score: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None + include_profile: Optional[StrictBool] = False + enable_llm_rerank: Optional[StrictBool] = False + filters: Optional[FilterNode] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["app_id", "project_id", "user_id", "agent_id", "query", "method", "top_k", "radius", "min_score", "include_profile", "enable_llm_rerank", "filters"] + + @field_validator('method') + def method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['keyword', 'vector', 'hybrid', 'agentic']): + raise ValueError("must be one of enum values ('keyword', 'vector', 'hybrid', 'agentic')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of filters + if self.filters: + _dict['filters'] = self.filters.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['user_id'] = None + + # set to None if agent_id (nullable) is None + # and model_fields_set contains the field + if self.agent_id is None and "agent_id" in self.model_fields_set: + _dict['agent_id'] = None + + # set to None if radius (nullable) is None + # and model_fields_set contains the field + if self.radius is None and "radius" in self.model_fields_set: + _dict['radius'] = None + + # set to None if min_score (nullable) is None + # and model_fields_set contains the field + if self.min_score is None and "min_score" in self.model_fields_set: + _dict['min_score'] = None + + # set to None if filters (nullable) is None + # and model_fields_set contains the field + if self.filters is None and "filters" in self.model_fields_set: + _dict['filters'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "app_id": obj.get("app_id") if obj.get("app_id") is not None else 'default', + "project_id": obj.get("project_id") if obj.get("project_id") is not None else 'default', + "user_id": obj.get("user_id"), + "agent_id": obj.get("agent_id"), + "query": obj.get("query"), + "method": obj.get("method") if obj.get("method") is not None else 'hybrid', + "top_k": obj.get("top_k") if obj.get("top_k") is not None else -1, + "radius": obj.get("radius"), + "min_score": obj.get("min_score"), + "include_profile": obj.get("include_profile") if obj.get("include_profile") is not None else False, + "enable_llm_rerank": obj.get("enable_llm_rerank") if obj.get("enable_llm_rerank") is not None else False, + "filters": FilterNode.from_dict(obj["filters"]) if obj.get("filters") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/search_profile_item.py b/everos_cloud/models/search_profile_item.py new file mode 100644 index 0000000..4f976f1 --- /dev/null +++ b/everos_cloud/models/search_profile_item.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SearchProfileItem(BaseModel): + """ + SearchProfileItem + """ # noqa: E501 + id: StrictStr + app_id: StrictStr + project_id: StrictStr + user_id: StrictStr + profile_data: Optional[Dict[str, Any]] = None + score: Optional[Union[StrictFloat, StrictInt]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "app_id", "project_id", "user_id", "profile_data", "score"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchProfileItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if score (nullable) is None + # and model_fields_set contains the field + if self.score is None and "score" in self.model_fields_set: + _dict['score'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchProfileItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "app_id": obj.get("app_id"), + "project_id": obj.get("project_id"), + "user_id": obj.get("user_id"), + "profile_data": obj.get("profile_data"), + "score": obj.get("score") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/sign_envelope.py b/everos_cloud/models/sign_envelope.py new file mode 100644 index 0000000..bb7f39f --- /dev/null +++ b/everos_cloud/models/sign_envelope.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.sign_envelope_all_of_result import SignEnvelopeAllOfResult +from typing import Optional, Set +from typing_extensions import Self + +class SignEnvelope(BaseModel): + """ + Response envelope for the sign endpoint. The `result.data` shape depends on `status`: - `status: 0` (success) — `result.data` is a `SignResponse`, as modelled below. - `status: 2018` (validation failed) — `result.data` is a plain string carrying the validator error message, not a `SignResponse`. - all other non-zero statuses — `result.data` is `null`. Generated clients should treat `result.data` as populated only when `status` is 0. + """ # noqa: E501 + error: Optional[StrictStr] = Field(default=None, description="`\"OK\"` on success, otherwise a human-readable error message decoded from the business error. ") + request_id: Optional[StrictStr] = None + status: Optional[StrictInt] = Field(default=None, description="Business status code; 0 means success") + result: Optional[SignEnvelopeAllOfResult] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "request_id", "status", "result"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignEnvelope from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of result + if self.result: + _dict['result'] = self.result.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignEnvelope from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "request_id": obj.get("request_id"), + "status": obj.get("status"), + "result": SignEnvelopeAllOfResult.from_dict(obj["result"]) if obj.get("result") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/sign_envelope_all_of_result.py b/everos_cloud/models/sign_envelope_all_of_result.py new file mode 100644 index 0000000..b32f5d0 --- /dev/null +++ b/everos_cloud/models/sign_envelope_all_of_result.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.sign_response import SignResponse +from typing import Optional, Set +from typing_extensions import Self + +class SignEnvelopeAllOfResult(BaseModel): + """ + SignEnvelopeAllOfResult + """ # noqa: E501 + data: Optional[SignResponse] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignEnvelopeAllOfResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignEnvelopeAllOfResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": SignResponse.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/sign_object_item.py b/everos_cloud/models/sign_object_item.py new file mode 100644 index 0000000..26a50b7 --- /dev/null +++ b/everos_cloud/models/sign_object_item.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SignObjectItem(BaseModel): + """ + SignObjectItem + """ # noqa: E501 + file_id: StrictStr = Field(alias="fileId") + file_name: StrictStr = Field(alias="fileName") + file_type: StrictStr = Field(description="Media class. Default size limits per type: image=10MB, file=100MB, video=500MB. These are defaults and may be overridden per token (via the token's `file_limits`); the effective limit is enforced by S3 through the presigned POST `content-length-range` condition, and surfaced as `objectSignedInfo.maxSize`. ", alias="fileType") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fileId", "fileName", "fileType"] + + @field_validator('file_type') + def file_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['image', 'file', 'video']): + raise ValueError("must be one of enum values ('image', 'file', 'video')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignObjectItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignObjectItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fileId": obj.get("fileId"), + "fileName": obj.get("fileName"), + "fileType": obj.get("fileType") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/sign_request.py b/everos_cloud/models/sign_request.py new file mode 100644 index 0000000..f0ac994 --- /dev/null +++ b/everos_cloud/models/sign_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from everos_cloud.models.sign_object_item import SignObjectItem +from typing import Optional, Set +from typing_extensions import Self + +class SignRequest(BaseModel): + """ + SignRequest + """ # noqa: E501 + object_list: Annotated[List[SignObjectItem], Field(min_length=1, max_length=50)] = Field(description="Objects to sign for upload. At most 50 per request (`status: 1007` if exceeded). Each `fileId` must be unique within the request (`status: 1009` on duplicates). ", alias="objectList") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["objectList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in object_list (list) + _items = [] + if self.object_list: + for _item_object_list in self.object_list: + if _item_object_list: + _items.append(_item_object_list.to_dict()) + _dict['objectList'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectList": [SignObjectItem.from_dict(_item) for _item in obj["objectList"]] if obj.get("objectList") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/sign_response.py b/everos_cloud/models/sign_response.py new file mode 100644 index 0000000..28b8497 --- /dev/null +++ b/everos_cloud/models/sign_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.sign_response_item import SignResponseItem +from typing import Optional, Set +from typing_extensions import Self + +class SignResponse(BaseModel): + """ + SignResponse + """ # noqa: E501 + object_list: Optional[List[SignResponseItem]] = Field(default=None, alias="objectList") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["objectList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in object_list (list) + _items = [] + if self.object_list: + for _item_object_list in self.object_list: + if _item_object_list: + _items.append(_item_object_list.to_dict()) + _dict['objectList'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectList": [SignResponseItem.from_dict(_item) for _item in obj["objectList"]] if obj.get("objectList") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/sign_response_item.py b/everos_cloud/models/sign_response_item.py new file mode 100644 index 0000000..cc416d6 --- /dev/null +++ b/everos_cloud/models/sign_response_item.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.signed_info import SignedInfo +from typing import Optional, Set +from typing_extensions import Self + +class SignResponseItem(BaseModel): + """ + SignResponseItem + """ # noqa: E501 + file_id: Optional[StrictStr] = Field(default=None, alias="fileId") + file_name: Optional[StrictStr] = Field(default=None, alias="fileName") + file_type: Optional[StrictStr] = Field(default=None, alias="fileType") + object_key: Optional[StrictStr] = Field(default=None, alias="objectKey") + object_url: Optional[StrictStr] = Field(default=None, description="Present in the response struct for parity with the find endpoint, but not populated on the sign path (omitted from the JSON). ", alias="objectUrl") + object_signed_info: Optional[SignedInfo] = Field(default=None, alias="objectSignedInfo") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fileId", "fileName", "fileType", "objectKey", "objectUrl", "objectSignedInfo"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignResponseItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of object_signed_info + if self.object_signed_info: + _dict['objectSignedInfo'] = self.object_signed_info.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignResponseItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fileId": obj.get("fileId"), + "fileName": obj.get("fileName"), + "fileType": obj.get("fileType"), + "objectKey": obj.get("objectKey"), + "objectUrl": obj.get("objectUrl"), + "objectSignedInfo": SignedInfo.from_dict(obj["objectSignedInfo"]) if obj.get("objectSignedInfo") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/signed_info.py b/everos_cloud/models/signed_info.py new file mode 100644 index 0000000..304f953 --- /dev/null +++ b/everos_cloud/models/signed_info.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SignedInfo(BaseModel): + """ + Presigned POST form data for direct-to-S3 upload + """ # noqa: E501 + url: Optional[StrictStr] = None + fields: Optional[Dict[str, StrictStr]] = None + max_size: Optional[StrictInt] = Field(default=None, description="Maximum file size in bytes", alias="maxSize") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url", "fields", "maxSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignedInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignedInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "fields": obj.get("fields"), + "maxSize": obj.get("maxSize") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/success_envelope_add_data.py b/everos_cloud/models/success_envelope_add_data.py new file mode 100644 index 0000000..e94b71a --- /dev/null +++ b/everos_cloud/models/success_envelope_add_data.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from everos_cloud.models.add_data import AddData +from typing import Optional, Set +from typing_extensions import Self + +class SuccessEnvelopeAddData(BaseModel): + """ + SuccessEnvelopeAddData + """ # noqa: E501 + request_id: StrictStr = Field(description="Request trace id (peer to data)") + data: AddData = Field(description="Endpoint-defined business result") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["request_id", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SuccessEnvelopeAddData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SuccessEnvelopeAddData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request_id": obj.get("request_id"), + "data": AddData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/success_envelope_delete_data.py b/everos_cloud/models/success_envelope_delete_data.py new file mode 100644 index 0000000..c775476 --- /dev/null +++ b/everos_cloud/models/success_envelope_delete_data.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from everos_cloud.models.delete_data import DeleteData +from typing import Optional, Set +from typing_extensions import Self + +class SuccessEnvelopeDeleteData(BaseModel): + """ + SuccessEnvelopeDeleteData + """ # noqa: E501 + request_id: StrictStr = Field(description="Request trace id (peer to data)") + data: DeleteData = Field(description="Endpoint-defined business result") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["request_id", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SuccessEnvelopeDeleteData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SuccessEnvelopeDeleteData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request_id": obj.get("request_id"), + "data": DeleteData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/success_envelope_edit_data.py b/everos_cloud/models/success_envelope_edit_data.py new file mode 100644 index 0000000..5f0b0bb --- /dev/null +++ b/everos_cloud/models/success_envelope_edit_data.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from everos_cloud.models.edit_data import EditData +from typing import Optional, Set +from typing_extensions import Self + +class SuccessEnvelopeEditData(BaseModel): + """ + SuccessEnvelopeEditData + """ # noqa: E501 + request_id: StrictStr = Field(description="Request trace id (peer to data)") + data: EditData = Field(description="Endpoint-defined business result") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["request_id", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SuccessEnvelopeEditData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SuccessEnvelopeEditData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request_id": obj.get("request_id"), + "data": EditData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/success_envelope_flush_data.py b/everos_cloud/models/success_envelope_flush_data.py new file mode 100644 index 0000000..78ba3f6 --- /dev/null +++ b/everos_cloud/models/success_envelope_flush_data.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from everos_cloud.models.flush_data import FlushData +from typing import Optional, Set +from typing_extensions import Self + +class SuccessEnvelopeFlushData(BaseModel): + """ + SuccessEnvelopeFlushData + """ # noqa: E501 + request_id: StrictStr = Field(description="Request trace id (peer to data)") + data: FlushData = Field(description="Endpoint-defined business result") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["request_id", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SuccessEnvelopeFlushData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SuccessEnvelopeFlushData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request_id": obj.get("request_id"), + "data": FlushData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/success_envelope_get_data.py b/everos_cloud/models/success_envelope_get_data.py new file mode 100644 index 0000000..4f3dbda --- /dev/null +++ b/everos_cloud/models/success_envelope_get_data.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from everos_cloud.models.get_data import GetData +from typing import Optional, Set +from typing_extensions import Self + +class SuccessEnvelopeGetData(BaseModel): + """ + SuccessEnvelopeGetData + """ # noqa: E501 + request_id: StrictStr = Field(description="Request trace id (peer to data)") + data: GetData = Field(description="Endpoint-defined business result") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["request_id", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SuccessEnvelopeGetData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SuccessEnvelopeGetData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request_id": obj.get("request_id"), + "data": GetData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/success_envelope_search_data.py b/everos_cloud/models/success_envelope_search_data.py new file mode 100644 index 0000000..6257737 --- /dev/null +++ b/everos_cloud/models/success_envelope_search_data.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from everos_cloud.models.search_data import SearchData +from typing import Optional, Set +from typing_extensions import Self + +class SuccessEnvelopeSearchData(BaseModel): + """ + SuccessEnvelopeSearchData + """ # noqa: E501 + request_id: StrictStr = Field(description="Request trace id (peer to data)") + data: SearchData = Field(description="Endpoint-defined business result") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["request_id", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SuccessEnvelopeSearchData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SuccessEnvelopeSearchData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request_id": obj.get("request_id"), + "data": SearchData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/tool_call.py b/everos_cloud/models/tool_call.py new file mode 100644 index 0000000..e85a6bf --- /dev/null +++ b/everos_cloud/models/tool_call.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.tool_call_function import ToolCallFunction +from typing import Optional, Set +from typing_extensions import Self + +class ToolCall(BaseModel): + """ + ToolCall + """ # noqa: E501 + id: StrictStr + type: Optional[StrictStr] = 'function' + function: ToolCallFunction + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "function"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ToolCall from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of function + if self.function: + _dict['function'] = self.function.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ToolCall from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type") if obj.get("type") is not None else 'function', + "function": ToolCallFunction.from_dict(obj["function"]) if obj.get("function") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/tool_call_function.py b/everos_cloud/models/tool_call_function.py new file mode 100644 index 0000000..71b4ec2 --- /dev/null +++ b/everos_cloud/models/tool_call_function.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ToolCallFunction(BaseModel): + """ + ToolCallFunction + """ # noqa: E501 + name: StrictStr + arguments: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "arguments"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ToolCallFunction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ToolCallFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "arguments": obj.get("arguments") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/unprocessed_message_dto.py b/everos_cloud/models/unprocessed_message_dto.py new file mode 100644 index 0000000..216547b --- /dev/null +++ b/everos_cloud/models/unprocessed_message_dto.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from everos_cloud.models.content import Content +from everos_cloud.models.tool_call import ToolCall +from typing import Optional, Set +from typing_extensions import Self + +class UnprocessedMessageDTO(BaseModel): + """ + Buffered raw message not yet extracted (no owner — inference happens after boundary detection). Returned by /search only when ``filters.session_id`` is a top-level eq scalar (spec §4 / appendix E). + """ # noqa: E501 + id: StrictStr + app_id: StrictStr + project_id: StrictStr + session_id: StrictStr + sender_id: StrictStr + sender_name: Optional[StrictStr] = None + role: StrictStr + content: Content + timestamp: datetime + tool_calls: Optional[List[ToolCall]] = None + tool_call_id: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "app_id", "project_id", "session_id", "sender_id", "sender_name", "role", "content", "timestamp", "tool_calls", "tool_call_id"] + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'assistant', 'tool']): + raise ValueError("must be one of enum values ('user', 'assistant', 'tool')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnprocessedMessageDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in tool_calls (list) + _items = [] + if self.tool_calls: + for _item_tool_calls in self.tool_calls: + if _item_tool_calls: + _items.append(_item_tool_calls.to_dict()) + _dict['tool_calls'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if sender_name (nullable) is None + # and model_fields_set contains the field + if self.sender_name is None and "sender_name" in self.model_fields_set: + _dict['sender_name'] = None + + # set to None if tool_calls (nullable) is None + # and model_fields_set contains the field + if self.tool_calls is None and "tool_calls" in self.model_fields_set: + _dict['tool_calls'] = None + + # set to None if tool_call_id (nullable) is None + # and model_fields_set contains the field + if self.tool_call_id is None and "tool_call_id" in self.model_fields_set: + _dict['tool_call_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnprocessedMessageDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "app_id": obj.get("app_id"), + "project_id": obj.get("project_id"), + "session_id": obj.get("session_id"), + "sender_id": obj.get("sender_id"), + "sender_name": obj.get("sender_name"), + "role": obj.get("role"), + "content": Content.from_dict(obj["content"]) if obj.get("content") is not None else None, + "timestamp": obj.get("timestamp"), + "tool_calls": [ToolCall.from_dict(_item) for _item in obj["tool_calls"]] if obj.get("tool_calls") is not None else None, + "tool_call_id": obj.get("tool_call_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/update_operation.py b/everos_cloud/models/update_operation.py new file mode 100644 index 0000000..432dc03 --- /dev/null +++ b/everos_cloud/models/update_operation.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from everos_cloud.models.data1 import Data1 +from typing import Optional, Set +from typing_extensions import Self + +class UpdateOperation(BaseModel): + """ + Update an existing profile item (partial ``data`` shallow-merge). + """ # noqa: E501 + reason: Optional[Annotated[str, Field(strict=True, max_length=256)]] = None + action: StrictStr + type: StrictStr + item_id: StrictStr + data: Data1 + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reason", "action", "type", "item_id", "data"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['update']): + raise ValueError("must be one of enum values ('update')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['explicit_info', 'implicit_traits']): + raise ValueError("must be one of enum values ('explicit_info', 'implicit_traits')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateOperation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if reason (nullable) is None + # and model_fields_set contains the field + if self.reason is None and "reason" in self.model_fields_set: + _dict['reason'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateOperation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reason": obj.get("reason"), + "action": obj.get("action"), + "type": obj.get("type"), + "item_id": obj.get("item_id"), + "data": Data1.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/validation_error.py b/everos_cloud/models/validation_error.py new file mode 100644 index 0000000..f6495a9 --- /dev/null +++ b/everos_cloud/models/validation_error.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from everos_cloud.models.validation_error_loc_inner import ValidationErrorLocInner +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + ValidationError + """ # noqa: E501 + loc: List[ValidationErrorLocInner] + msg: StrictStr + type: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["loc", "msg", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in loc (list) + _items = [] + if self.loc: + for _item_loc in self.loc: + if _item_loc: + _items.append(_item_loc.to_dict()) + _dict['loc'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loc": [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, + "msg": obj.get("msg"), + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/everos_cloud/models/validation_error_loc_inner.py b/everos_cloud/models/validation_error_loc_inner.py new file mode 100644 index 0000000..d163a35 --- /dev/null +++ b/everos_cloud/models/validation_error_loc_inner.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator +from typing import Optional +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +VALIDATIONERRORLOCINNER_ANY_OF_SCHEMAS = ["int", "str"] + +class ValidationErrorLocInner(BaseModel): + """ + ValidationErrorLocInner + """ + + # data type: str + anyof_schema_1_validator: Optional[StrictStr] = None + # data type: int + anyof_schema_2_validator: Optional[StrictInt] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[int, str]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "int", "str" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = ValidationErrorLocInner.model_construct() + error_messages = [] + # validate data type: str + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: int + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # deserialize data into str + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into int + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/everos_cloud/py.typed b/everos_cloud/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/everos_cloud/rest.py b/everos_cloud/rest.py new file mode 100644 index 0000000..184666a --- /dev/null +++ b/everos_cloud/rest.py @@ -0,0 +1,258 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from everos_cloud.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/openapi.json b/openapi.json new file mode 100644 index 0000000..c5e9935 --- /dev/null +++ b/openapi.json @@ -0,0 +1,2787 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "EverOS Cloud Memory API", + "version": "2.0.0", + "license": { + "name": "Apache-2.0", + "identifier": "Apache-2.0" + }, + "contact": { + "name": "EverMind AI", + "email": "service@evermind.ai", + "url": "https://github.com/EverMind-AI/everos-cloud-sdk-python" + }, + "description": "Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python" + }, + "paths": { + "/api/v2/memory/add": { + "post": { + "tags": [ + "Memory" + ], + "summary": "Add messages [OSS + Cloud]", + "operationId": "addMemory", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Synchronous write result (async_mode=false).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessEnvelope_AddData_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + }, + "202": { + "description": "Accepted for asynchronous processing (async_mode=true, default).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessEnvelope_AddData_" + } + } + } + }, + "401": { + "description": "Missing or invalid bearer token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Authenticated but not permitted \u2014 either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "429": { + "description": "Rate limit or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "503": { + "description": "The gateway could not reach the authentication service. Transient \u2014 retry with backoff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + } + } + } + }, + "/api/v2/memory/delete": { + "post": { + "tags": [ + "Memory" + ], + "summary": "Delete memories [Cloud-only]", + "operationId": "deleteMemory", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessEnvelope_DeleteData_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + }, + "401": { + "description": "Missing or invalid bearer token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Authenticated but not permitted \u2014 either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "429": { + "description": "Rate limit or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "503": { + "description": "The gateway could not reach the authentication service. Transient \u2014 retry with backoff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + } + } + } + }, + "/api/v2/memory/edit": { + "post": { + "tags": [ + "Memory" + ], + "summary": "Edit profile items [Cloud-only]", + "operationId": "editProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessEnvelope_EditData_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + }, + "401": { + "description": "Missing or invalid bearer token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Authenticated but not permitted \u2014 either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "429": { + "description": "Rate limit or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "503": { + "description": "The gateway could not reach the authentication service. Transient \u2014 retry with backoff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + } + } + } + }, + "/api/v2/memory/flush": { + "post": { + "tags": [ + "Memory" + ], + "summary": "Force boundary detection + extraction [OSS + Cloud]", + "operationId": "flush_api_v2_memory_flush_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlushInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessEnvelope_FlushData_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + }, + "401": { + "description": "Missing or invalid bearer token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Authenticated but not permitted \u2014 either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "429": { + "description": "Rate limit or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "503": { + "description": "The gateway could not reach the authentication service. Transient \u2014 retry with backoff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + } + } + } + }, + "/api/v2/memory/get": { + "post": { + "tags": [ + "Memory" + ], + "summary": "Get memories (paginated) [OSS + Cloud]", + "operationId": "getMemory", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessEnvelope_GetData_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + }, + "401": { + "description": "Missing or invalid bearer token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Authenticated but not permitted \u2014 either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "429": { + "description": "Rate limit or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "503": { + "description": "The gateway could not reach the authentication service. Transient \u2014 retry with backoff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + } + } + } + }, + "/api/v2/memory/search": { + "post": { + "tags": [ + "Memory" + ], + "summary": "Search memories [OSS + Cloud]", + "operationId": "searchMemory", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessEnvelope_SearchData_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + }, + "401": { + "description": "Missing or invalid bearer token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Authenticated but not permitted \u2014 either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "429": { + "description": "Rate limit or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "503": { + "description": "The gateway could not reach the authentication service. Transient \u2014 retry with backoff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + } + } + } + }, + "/api/v2/object/sign": { + "post": { + "tags": [ + "Storage" + ], + "summary": "Upload multimodal data (generate presigned upload info)", + "operationId": "signObjects", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Envelope response (MMS returns HTTP 200 for every business outcome;\nonly unmatched routes return 404). `status: 0` means success and\n`result.data` is a SignResponse. Non-zero `status` values seen on\nthis endpoint:\n\n- `20003` \u2014 request body bind failure (malformed JSON).\n- `2018` \u2014 parameter validation failed (e.g. missing `objectList`,\n `fileId`, `fileName`, or `fileType`); `result.data` is the\n validator error string.\n- `1012` \u2014 `mms-token` missing, invalid, expired, or revoked\n (emitted by the auth middleware before the handler runs).\n- `1013` \u2014 token lacks the required `object:sign` scope.\n- `1007` \u2014 `objectList` exceeds the per-request limit of 50.\n- `1002` \u2014 `fileType` not one of image/video/file.\n- `1009` \u2014 duplicate `fileId` within the request.\n- `1004` \u2014 S3 operation failed (bucket unavailable).\n- `1005` \u2014 presigned POST generation failed.\n- `2015` \u2014 object metadata persistence failed.\n- `20001` \u2014 unhandled internal server error.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignEnvelope" + } + } + } + }, + "401": { + "description": "Missing or invalid bearer token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Authenticated but not permitted \u2014 either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "429": { + "description": "Rate limit or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "503": { + "description": "The gateway could not reach the authentication service. Transient \u2014 retry with backoff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AddData": { + "properties": { + "message_count": { + "type": "integer", + "title": "Message Count" + }, + "status": { + "type": "string", + "enum": [ + "accumulated", + "extracted", + "queued" + ], + "title": "Status", + "description": "\"queued\" \u2014 async enqueue accepted (HTTP 202). \"accumulated\"/\"extracted\" \u2014 synchronous write outcome (HTTP 200, async_mode=false)." + } + }, + "type": "object", + "required": [ + "message_count", + "status" + ], + "title": "AddData" + }, + "AddInput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "default": "default" + }, + "project_id": { + "type": "string", + "title": "Project Id", + "default": "default" + }, + "session_id": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "title": "Session Id" + }, + "mode": { + "type": "string", + "enum": [ + "chat", + "agent" + ], + "title": "Mode", + "default": "chat" + }, + "messages": { + "items": { + "$ref": "#/components/schemas/MessageItem" + }, + "type": "array", + "maxItems": 500, + "minItems": 1, + "title": "Messages" + }, + "async_mode": { + "type": "boolean", + "default": true, + "title": "Async Mode", + "description": "Selects the write path. true (default): validated and enqueued asynchronously \u2192 HTTP 202 with status \"queued\". false: forwarded synchronously to the engine, returning its 200 result and surfacing write errors directly. Extraction is always asynchronous (flush-triggered)." + } + }, + "type": "object", + "required": [ + "session_id", + "messages" + ], + "title": "AddInput", + "example": { + "session_id": "session-1", + "messages": [ + { + "sender_id": "user-1", + "role": "user", + "timestamp": 1700000000, + "content": "I love hiking in the mountains" + } + ] + } + }, + "AddOperation": { + "properties": { + "reason": { + "anyOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "null" + } + ], + "title": "Reason" + }, + "action": { + "type": "string", + "const": "add", + "title": "Action" + }, + "type": { + "type": "string", + "enum": [ + "explicit_info", + "implicit_traits" + ], + "title": "Type" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExplicitInfoData" + }, + { + "$ref": "#/components/schemas/ImplicitTraitData" + } + ], + "title": "Data" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "action", + "type", + "data" + ], + "title": "AddOperation", + "description": "Add a new profile item (``item_id`` forbidden \u2014 the server mints it)." + }, + "AgentCaseItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "session_id": { + "type": "string", + "title": "Session Id" + }, + "task_intent": { + "type": "string", + "title": "Task Intent" + }, + "approach": { + "type": "string", + "title": "Approach" + }, + "quality_score": { + "type": "number", + "title": "Quality Score" + }, + "key_insight": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key Insight" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "agent_id", + "session_id", + "task_intent", + "approach", + "quality_score", + "timestamp" + ], + "title": "AgentCaseItem" + }, + "AgentSkillItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "content": { + "type": "string", + "title": "Content" + }, + "confidence": { + "type": "number", + "title": "Confidence" + }, + "maturity_score": { + "type": "number", + "title": "Maturity Score" + }, + "source_case_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Source Case Ids" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "agent_id", + "name", + "description", + "content", + "confidence", + "maturity_score" + ], + "title": "AgentSkillItem" + }, + "AtomicFactItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "content": { + "type": "string", + "title": "Content" + } + }, + "type": "object", + "required": [ + "id", + "content" + ], + "title": "AtomicFactItem", + "description": "Atomic fact nested in an episode. Spec appendix E references it but does\nnot enumerate its fields \u2014 minimal shape until the contract is detailed." + }, + "ContentItem": { + "properties": { + "type": { + "type": "string", + "enum": [ + "text", + "audio", + "image", + "doc", + "pdf", + "html", + "email" + ], + "title": "Type" + }, + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text" + }, + "source": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source" + }, + "base64": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base64" + }, + "uri": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Uri" + }, + "ext": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ext" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "source_info": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Source Info" + }, + "extras": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Extras" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "ContentItem", + "description": "A single content element (appendix A). Current phase: only ``type=\"text\"``." + }, + "DeleteData": { + "properties": { + "filters": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Filters", + "description": "Scope filters used, e.g. ['user_id'] or ['user_id', 'session_id']" + }, + "count": { + "type": "integer", + "title": "Count", + "description": "Total memory records soft-deleted", + "default": 0 + } + }, + "type": "object", + "title": "DeleteData", + "description": "Delete result (mirrors v1 ``DeleteMemoriesResult``): which scope filters were\napplied + how many mongo records were soft-deleted across all memory types." + }, + "DeleteInput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "default": "default" + }, + "project_id": { + "type": "string", + "title": "Project Id", + "default": "default" + }, + "user_id": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "User Id" + }, + "agent_id": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Agent Id" + }, + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id" + } + }, + "additionalProperties": false, + "type": "object", + "title": "DeleteInput", + "example": { + "user_id": "user-1", + "session_id": "session-1" + } + }, + "DeleteOperation": { + "properties": { + "reason": { + "anyOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "null" + } + ], + "title": "Reason" + }, + "action": { + "type": "string", + "const": "delete", + "title": "Action" + }, + "type": { + "type": "string", + "enum": [ + "explicit_info", + "implicit_traits" + ], + "title": "Type" + }, + "item_id": { + "type": "string", + "title": "Item Id" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "action", + "type", + "item_id" + ], + "title": "DeleteOperation", + "description": "Delete an existing profile item by ``item_id`` (carries no ``data``)." + }, + "EditData": { + "properties": { + "user_id": { + "type": "string", + "title": "User Id" + }, + "version": { + "type": "integer", + "title": "Version" + }, + "applied": { + "type": "integer", + "title": "Applied" + }, + "results": { + "items": { + "$ref": "#/components/schemas/EditResultItem" + }, + "type": "array", + "title": "Results" + }, + "profile": { + "additionalProperties": true, + "type": "object", + "title": "Profile" + } + }, + "type": "object", + "required": [ + "user_id", + "version", + "applied" + ], + "title": "EditData", + "description": "Response payload for a successful profile edit request." + }, + "EditInput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "default": "default" + }, + "project_id": { + "type": "string", + "title": "Project Id", + "default": "default" + }, + "user_id": { + "type": "string", + "minLength": 1, + "title": "User Id" + }, + "memory_type": { + "type": "string", + "const": "profile", + "title": "Memory Type", + "default": "profile" + }, + "operations": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AddOperation" + }, + { + "$ref": "#/components/schemas/UpdateOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + } + ], + "discriminator": { + "propertyName": "action", + "mapping": { + "add": "#/components/schemas/AddOperation", + "delete": "#/components/schemas/DeleteOperation", + "update": "#/components/schemas/UpdateOperation" + } + } + }, + "type": "array", + "maxItems": 50, + "minItems": 1, + "title": "Operations" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "user_id", + "operations" + ], + "title": "EditInput", + "description": "Bulk profile edit request [Cloud-only].\n\nCarries 1\u201350 ``EditOperation`` items targeting a single user's profile.\n``memory_type`` is pinned to ``\"profile\"``; ``source`` is server-set and\nnot accepted from the client.", + "example": { + "user_id": "user-1", + "operations": [ + { + "action": "add", + "type": "explicit_info", + "reason": "Stated in session-1", + "data": { + "category": "hobby", + "description": "Enjoys hiking in the mountains" + } + } + ] + } + }, + "EditResultItem": { + "properties": { + "op_index": { + "type": "integer", + "title": "Op Index" + }, + "action": { + "type": "string", + "title": "Action" + }, + "type": { + "type": "string", + "title": "Type" + }, + "status": { + "type": "string", + "enum": [ + "applied", + "rejected" + ], + "title": "Status" + }, + "item_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Item Id" + }, + "new_item_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Item Id" + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error" + } + }, + "type": "object", + "required": [ + "op_index", + "action", + "type", + "status" + ], + "title": "EditResultItem", + "description": "Per-operation outcome returned in ``EditData.results``." + }, + "EpisodeItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Id" + }, + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "sender_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Sender Ids" + }, + "summary": { + "type": "string", + "title": "Summary" + }, + "subject": { + "type": "string", + "title": "Subject" + }, + "episode": { + "type": "string", + "title": "Episode" + }, + "type": { + "type": "string", + "title": "Type" + }, + "atomic_facts": { + "items": { + "$ref": "#/components/schemas/AtomicFactItem" + }, + "type": "array", + "title": "Atomic Facts" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "timestamp", + "summary", + "subject", + "episode", + "type" + ], + "title": "EpisodeItem" + }, + "ExplicitInfoData": { + "properties": { + "category": { + "type": "string", + "minLength": 1, + "title": "Category" + }, + "description": { + "type": "string", + "maxLength": 4000, + "minLength": 1, + "title": "Description" + } + }, + "additionalProperties": true, + "type": "object", + "required": [ + "category", + "description" + ], + "title": "ExplicitInfoData", + "description": "``data`` payload for ``add explicit_info`` \u2014 ``category`` + ``description``\nrequired (non-empty); other fields (``evidence``, ``sources``, \u2026) pass through." + }, + "ExplicitInfoPatch": { + "properties": { + "category": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Category" + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 4000, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Description" + } + }, + "additionalProperties": true, + "type": "object", + "title": "ExplicitInfoPatch", + "description": "``data`` payload for ``update explicit_info`` \u2014 partial; at least one of\n``category`` / ``description`` (non-empty if present); others pass through." + }, + "FilterNode": { + "properties": { + "AND": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/FilterNode" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "And" + }, + "OR": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/FilterNode" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Or" + } + }, + "additionalProperties": true, + "type": "object", + "title": "FilterNode", + "description": "One Filters DSL node \u2014 recursive ``AND`` / ``OR`` arrays plus arbitrary\nscalar field conditions at the same level." + }, + "FlushData": { + "properties": { + "status": { + "type": "string", + "enum": [ + "extracted", + "no_extraction" + ], + "title": "Status" + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "FlushData" + }, + "FlushInput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "default": "default" + }, + "project_id": { + "type": "string", + "title": "Project Id", + "default": "default" + }, + "session_id": { + "type": "string", + "minLength": 1, + "title": "Session Id" + } + }, + "type": "object", + "required": [ + "session_id" + ], + "title": "FlushInput" + }, + "GetData": { + "properties": { + "episodes": { + "items": { + "$ref": "#/components/schemas/EpisodeItem" + }, + "type": "array", + "title": "Episodes" + }, + "profiles": { + "items": { + "$ref": "#/components/schemas/ProfileItem" + }, + "type": "array", + "title": "Profiles" + }, + "agent_cases": { + "items": { + "$ref": "#/components/schemas/AgentCaseItem" + }, + "type": "array", + "title": "Agent Cases" + }, + "agent_skills": { + "items": { + "$ref": "#/components/schemas/AgentSkillItem" + }, + "type": "array", + "title": "Agent Skills" + }, + "total_count": { + "type": "integer", + "title": "Total Count", + "default": 0 + }, + "count": { + "type": "integer", + "title": "Count", + "default": 0 + } + }, + "type": "object", + "title": "GetData" + }, + "GetInput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "default": "default" + }, + "project_id": { + "type": "string", + "title": "Project Id", + "default": "default" + }, + "user_id": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "User Id" + }, + "agent_id": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Agent Id" + }, + "memory_type": { + "type": "string", + "enum": [ + "episode", + "profile", + "agent_case", + "agent_skill" + ], + "title": "Memory Type" + }, + "page": { + "type": "integer", + "minimum": 1.0, + "title": "Page", + "default": 1 + }, + "page_size": { + "type": "integer", + "maximum": 100.0, + "minimum": 1.0, + "title": "Page Size", + "default": 20 + }, + "sort_by": { + "type": "string", + "enum": [ + "timestamp", + "updated_at" + ], + "title": "Sort By", + "default": "timestamp" + }, + "sort_order": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Sort Order", + "default": "desc" + }, + "filters": { + "anyOf": [ + { + "$ref": "#/components/schemas/FilterNode" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "memory_type" + ], + "title": "GetInput", + "example": { + "memory_type": "episode", + "page": 1, + "page_size": 20, + "sort_order": "desc" + } + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "ImplicitTraitData": { + "properties": { + "trait": { + "type": "string", + "minLength": 1, + "title": "Trait" + }, + "description": { + "type": "string", + "maxLength": 4000, + "minLength": 1, + "title": "Description" + } + }, + "additionalProperties": true, + "type": "object", + "required": [ + "trait", + "description" + ], + "title": "ImplicitTraitData", + "description": "``data`` payload for ``add implicit_traits`` \u2014 ``trait`` + ``description``\nrequired (non-empty); other fields (``basis``, ``evidence``, ``sources``, \u2026)\npass through." + }, + "ImplicitTraitPatch": { + "properties": { + "trait": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Trait" + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 4000, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Description" + } + }, + "additionalProperties": true, + "type": "object", + "title": "ImplicitTraitPatch", + "description": "``data`` payload for ``update implicit_traits`` \u2014 partial; at least one of\n``trait`` / ``description`` (non-empty if present); others pass through." + }, + "MessageItem": { + "properties": { + "sender_id": { + "type": "string", + "title": "Sender Id" + }, + "sender_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sender Name" + }, + "role": { + "type": "string", + "enum": [ + "user", + "assistant", + "tool" + ], + "title": "Role" + }, + "timestamp": { + "type": "integer", + "title": "Timestamp" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/ContentItem" + }, + "type": "array" + } + ], + "title": "Content" + }, + "tool_calls": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ToolCall" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tool Calls" + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tool Call Id" + } + }, + "type": "object", + "required": [ + "sender_id", + "role", + "timestamp", + "content" + ], + "title": "MessageItem", + "description": "One message in an /add batch (spec \u00a72). ``content`` accepts a plain string\n(shorthand for a single text ContentItem) or an explicit ContentItem list." + }, + "ProfileItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "profile_data": { + "additionalProperties": true, + "type": "object", + "title": "Profile Data" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "user_id" + ], + "title": "ProfileItem" + }, + "SearchAgentCaseItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "session_id": { + "type": "string", + "title": "Session Id" + }, + "task_intent": { + "type": "string", + "title": "Task Intent" + }, + "approach": { + "type": "string", + "title": "Approach" + }, + "quality_score": { + "type": "number", + "title": "Quality Score" + }, + "key_insight": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key Insight" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "score": { + "type": "number", + "title": "Score" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "agent_id", + "session_id", + "task_intent", + "approach", + "quality_score", + "timestamp", + "score" + ], + "title": "SearchAgentCaseItem" + }, + "SearchAgentSkillItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "content": { + "type": "string", + "title": "Content" + }, + "confidence": { + "type": "number", + "title": "Confidence" + }, + "maturity_score": { + "type": "number", + "title": "Maturity Score" + }, + "source_case_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Source Case Ids" + }, + "score": { + "type": "number", + "title": "Score" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "agent_id", + "name", + "description", + "content", + "confidence", + "maturity_score", + "score" + ], + "title": "SearchAgentSkillItem" + }, + "SearchAtomicFactItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "content": { + "type": "string", + "title": "Content" + }, + "score": { + "type": "number", + "title": "Score" + } + }, + "type": "object", + "required": [ + "id", + "content", + "score" + ], + "title": "SearchAtomicFactItem" + }, + "SearchData": { + "properties": { + "episodes": { + "items": { + "$ref": "#/components/schemas/SearchEpisodeItem" + }, + "type": "array", + "title": "Episodes" + }, + "profiles": { + "items": { + "$ref": "#/components/schemas/SearchProfileItem" + }, + "type": "array", + "title": "Profiles" + }, + "agent_cases": { + "items": { + "$ref": "#/components/schemas/SearchAgentCaseItem" + }, + "type": "array", + "title": "Agent Cases" + }, + "agent_skills": { + "items": { + "$ref": "#/components/schemas/SearchAgentSkillItem" + }, + "type": "array", + "title": "Agent Skills" + }, + "unprocessed_messages": { + "items": { + "$ref": "#/components/schemas/UnprocessedMessageDTO" + }, + "type": "array", + "title": "Unprocessed Messages" + } + }, + "type": "object", + "title": "SearchData" + }, + "SearchEpisodeItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Id" + }, + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "sender_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Sender Ids" + }, + "summary": { + "type": "string", + "title": "Summary" + }, + "subject": { + "type": "string", + "title": "Subject" + }, + "episode": { + "type": "string", + "title": "Episode" + }, + "type": { + "type": "string", + "title": "Type" + }, + "atomic_facts": { + "items": { + "$ref": "#/components/schemas/SearchAtomicFactItem" + }, + "type": "array", + "title": "Atomic Facts" + }, + "score": { + "type": "number", + "title": "Score" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "timestamp", + "summary", + "subject", + "episode", + "type", + "score" + ], + "title": "SearchEpisodeItem" + }, + "SearchInput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "default": "default" + }, + "project_id": { + "type": "string", + "title": "Project Id", + "default": "default" + }, + "user_id": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "User Id" + }, + "agent_id": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Agent Id" + }, + "query": { + "type": "string", + "minLength": 1, + "title": "Query" + }, + "method": { + "type": "string", + "enum": [ + "keyword", + "vector", + "hybrid", + "agentic" + ], + "title": "Method", + "default": "hybrid" + }, + "top_k": { + "type": "integer", + "title": "Top K", + "default": -1 + }, + "radius": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Radius" + }, + "min_score": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Min Score" + }, + "include_profile": { + "type": "boolean", + "title": "Include Profile", + "default": false + }, + "enable_llm_rerank": { + "type": "boolean", + "title": "Enable Llm Rerank", + "default": false + }, + "filters": { + "anyOf": [ + { + "$ref": "#/components/schemas/FilterNode" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "query" + ], + "title": "SearchInput", + "example": { + "query": "outdoor hobbies", + "method": "hybrid", + "top_k": 10, + "include_profile": true + } + }, + "SearchProfileItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "profile_data": { + "additionalProperties": true, + "type": "object", + "title": "Profile Data" + }, + "score": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Score" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "user_id" + ], + "title": "SearchProfileItem" + }, + "SuccessEnvelope_AddData_": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id", + "description": "Request trace id (peer to data)" + }, + "data": { + "$ref": "#/components/schemas/AddData", + "description": "Endpoint-defined business result" + } + }, + "type": "object", + "required": [ + "request_id", + "data" + ], + "title": "SuccessEnvelope[AddData]" + }, + "SuccessEnvelope_DeleteData_": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id", + "description": "Request trace id (peer to data)" + }, + "data": { + "$ref": "#/components/schemas/DeleteData", + "description": "Endpoint-defined business result" + } + }, + "type": "object", + "required": [ + "request_id", + "data" + ], + "title": "SuccessEnvelope[DeleteData]" + }, + "SuccessEnvelope_EditData_": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id", + "description": "Request trace id (peer to data)" + }, + "data": { + "$ref": "#/components/schemas/EditData", + "description": "Endpoint-defined business result" + } + }, + "type": "object", + "required": [ + "request_id", + "data" + ], + "title": "SuccessEnvelope[EditData]" + }, + "SuccessEnvelope_FlushData_": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id", + "description": "Request trace id (peer to data)" + }, + "data": { + "$ref": "#/components/schemas/FlushData", + "description": "Endpoint-defined business result" + } + }, + "type": "object", + "required": [ + "request_id", + "data" + ], + "title": "SuccessEnvelope[FlushData]" + }, + "SuccessEnvelope_GetData_": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id", + "description": "Request trace id (peer to data)" + }, + "data": { + "$ref": "#/components/schemas/GetData", + "description": "Endpoint-defined business result" + } + }, + "type": "object", + "required": [ + "request_id", + "data" + ], + "title": "SuccessEnvelope[GetData]" + }, + "SuccessEnvelope_SearchData_": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id", + "description": "Request trace id (peer to data)" + }, + "data": { + "$ref": "#/components/schemas/SearchData", + "description": "Endpoint-defined business result" + } + }, + "type": "object", + "required": [ + "request_id", + "data" + ], + "title": "SuccessEnvelope[SearchData]" + }, + "ToolCall": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "type": { + "type": "string", + "title": "Type", + "default": "function" + }, + "function": { + "$ref": "#/components/schemas/ToolCallFunction" + } + }, + "type": "object", + "required": [ + "id", + "function" + ], + "title": "ToolCall" + }, + "ToolCallFunction": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "arguments": { + "type": "string", + "title": "Arguments" + } + }, + "type": "object", + "required": [ + "name", + "arguments" + ], + "title": "ToolCallFunction" + }, + "UnprocessedMessageDTO": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "session_id": { + "type": "string", + "title": "Session Id" + }, + "sender_id": { + "type": "string", + "title": "Sender Id" + }, + "sender_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sender Name" + }, + "role": { + "type": "string", + "enum": [ + "user", + "assistant", + "tool" + ], + "title": "Role" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/ContentItem" + }, + "type": "array" + } + ], + "title": "Content" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "tool_calls": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ToolCall" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tool Calls" + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tool Call Id" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "session_id", + "sender_id", + "role", + "content", + "timestamp" + ], + "title": "UnprocessedMessageDTO", + "description": "Buffered raw message not yet extracted (no owner \u2014 inference happens after\nboundary detection). Returned by /search only when ``filters.session_id`` is a\ntop-level eq scalar (spec \u00a74 / appendix E)." + }, + "UpdateOperation": { + "properties": { + "reason": { + "anyOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "null" + } + ], + "title": "Reason" + }, + "action": { + "type": "string", + "const": "update", + "title": "Action" + }, + "type": { + "type": "string", + "enum": [ + "explicit_info", + "implicit_traits" + ], + "title": "Type" + }, + "item_id": { + "type": "string", + "title": "Item Id" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExplicitInfoPatch" + }, + { + "$ref": "#/components/schemas/ImplicitTraitPatch" + } + ], + "title": "Data" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "action", + "type", + "item_id", + "data" + ], + "title": "UpdateOperation", + "description": "Update an existing profile item (partial ``data`` shallow-merge)." + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + }, + "SignRequest": { + "type": "object", + "required": [ + "objectList" + ], + "properties": { + "objectList": { + "type": "array", + "minItems": 1, + "maxItems": 50, + "description": "Objects to sign for upload. At most 50 per request\n(`status: 1007` if exceeded). Each `fileId` must be unique within\nthe request (`status: 1009` on duplicates).\n", + "items": { + "$ref": "#/components/schemas/SignObjectItem" + } + } + }, + "example": { + "objectList": [ + { + "fileId": "file-1", + "fileName": "photo.jpg", + "fileType": "image" + } + ] + } + }, + "SignObjectItem": { + "type": "object", + "required": [ + "fileId", + "fileName", + "fileType" + ], + "properties": { + "fileId": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "fileType": { + "type": "string", + "enum": [ + "image", + "file", + "video" + ], + "description": "Media class. Default size limits per type: image=10MB,\nfile=100MB, video=500MB. These are defaults and may be overridden\nper token (via the token's `file_limits`); the effective limit is\nenforced by S3 through the presigned POST `content-length-range`\ncondition, and surfaced as `objectSignedInfo.maxSize`.\n" + } + } + }, + "SignResponse": { + "type": "object", + "properties": { + "objectList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignResponseItem" + } + } + } + }, + "SignResponseItem": { + "type": "object", + "properties": { + "fileId": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "fileType": { + "type": "string" + }, + "objectKey": { + "type": "string" + }, + "objectUrl": { + "type": "string", + "description": "Present in the response struct for parity with the find endpoint,\nbut not populated on the sign path (omitted from the JSON).\n" + }, + "objectSignedInfo": { + "$ref": "#/components/schemas/SignedInfo" + } + } + }, + "SignedInfo": { + "type": "object", + "description": "Presigned POST form data for direct-to-S3 upload", + "properties": { + "url": { + "type": "string" + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxSize": { + "type": "integer", + "format": "int64", + "description": "Maximum file size in bytes" + } + } + }, + "Envelope": { + "type": "object", + "description": "Common response envelope", + "properties": { + "error": { + "type": "string", + "description": "`\"OK\"` on success, otherwise a human-readable error message\ndecoded from the business error.\n" + }, + "request_id": { + "type": "string" + }, + "status": { + "type": "integer", + "description": "Business status code; 0 means success" + }, + "result": { + "type": "object", + "properties": { + "data": true + } + } + } + }, + "SignEnvelope": { + "description": "Response envelope for the sign endpoint. The `result.data` shape\ndepends on `status`:\n\n- `status: 0` (success) \u2014 `result.data` is a `SignResponse`, as\n modelled below.\n- `status: 2018` (validation failed) \u2014 `result.data` is a plain\n string carrying the validator error message, not a `SignResponse`.\n- all other non-zero statuses \u2014 `result.data` is `null`.\n\nGenerated clients should treat `result.data` as populated only when\n`status` is 0.\n", + "allOf": [ + { + "$ref": "#/components/schemas/Envelope" + }, + { + "type": "object", + "properties": { + "result": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SignResponse" + } + } + } + } + } + ] + }, + "GatewayError": { + "type": "object", + "additionalProperties": true, + "description": "Gateway error body. NOTE: shape is not yet uniform across auth/quota/ rate-limit paths \u2014 treat fields as best-effort. Commonly includes a `code`/`message` (flat) or an `error` object/string with a `message`.", + "title": "GatewayError" + } + }, + "securitySchemes": { + "BearerAuth": { + "type": "http", + "scheme": "bearer", + "description": "API key issued by EverOS, sent as `Authorization: Bearer `." + } + } + }, + "servers": [ + { + "url": "https://api.evermind.ai", + "description": "Production" + } + ], + "security": [ + { + "BearerAuth": [] + } + ] +} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..df816cc --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,89 @@ +[tool.poetry] +name = "everos_cloud" +version = "1.0.0-rc1" +description = "EverOS Cloud Memory API" +authors = ["EverMind AI "] +license = "Apache-2.0" +readme = "README.md" +repository = "https://github.com/EverMind-AI/everos-cloud-sdk-python" +keywords = ["OpenAPI", "OpenAPI-Generator", "EverOS Cloud Memory API"] +include = ["everos_cloud/py.typed"] + +[tool.poetry.dependencies] +python = "^3.8" + +urllib3 = ">= 1.25.3 < 3.0.0" +python-dateutil = ">= 2.8.2" +pydantic = ">= 2" +typing-extensions = ">= 4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "everos_cloud", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +extra_checks = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true + +[[tool.mypy.overrides]] +module = [ + "everos_cloud.configuration", +] +warn_unused_ignores = true +strict_equality = true +extra_checks = true +check_untyped_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_reexport = true +warn_return_any = true diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..67f7f68 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +urllib3 >= 1.25.3, < 3.0.0 +python_dateutil >= 2.8.2 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..11433ee --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..8653167 --- /dev/null +++ b/setup.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "everos-cloud" +VERSION = "1.0.0-rc1" +PYTHON_REQUIRES = ">= 3.8" +REQUIRES = [ + "urllib3 >= 1.25.3, < 3.0.0", + "python-dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="EverOS Cloud Memory API", + author="EverMind AI", + author_email="service@evermind.ai", + url="https://github.com/EverMind-AI/everos-cloud-sdk-python", + keywords=["OpenAPI", "OpenAPI-Generator", "EverOS Cloud Memory API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + license="Apache-2.0", + long_description_content_type='text/markdown', + long_description="""\ + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + """, # noqa: E501 + package_data={"everos_cloud": ["py.typed"]}, +) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..e98555c --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,6 @@ +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_add_data.py b/test/test_add_data.py new file mode 100644 index 0000000..cf139cc --- /dev/null +++ b/test/test_add_data.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.add_data import AddData + +class TestAddData(unittest.TestCase): + """AddData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddData: + """Test AddData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddData` + """ + model = AddData() + if include_optional: + return AddData( + message_count = 56, + status = 'accumulated' + ) + else: + return AddData( + message_count = 56, + status = 'accumulated', + ) + """ + + def testAddData(self): + """Test AddData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_input.py b/test/test_add_input.py new file mode 100644 index 0000000..852aa1c --- /dev/null +++ b/test/test_add_input.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.add_input import AddInput + +class TestAddInput(unittest.TestCase): + """AddInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddInput: + """Test AddInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddInput` + """ + model = AddInput() + if include_optional: + return AddInput( + app_id = 'default', + project_id = 'default', + session_id = '0', + mode = 'chat', + messages = [ + everos_cloud.models.message_item.MessageItem( + sender_id = '', + sender_name = '', + role = 'user', + timestamp = 56, + content = null, + tool_calls = [ + everos_cloud.models.tool_call.ToolCall( + id = '', + type = 'function', + function = everos_cloud.models.tool_call_function.ToolCallFunction( + name = '', + arguments = '', ), ) + ], + tool_call_id = '', ) + ], + async_mode = True + ) + else: + return AddInput( + session_id = '0', + messages = [ + everos_cloud.models.message_item.MessageItem( + sender_id = '', + sender_name = '', + role = 'user', + timestamp = 56, + content = null, + tool_calls = [ + everos_cloud.models.tool_call.ToolCall( + id = '', + type = 'function', + function = everos_cloud.models.tool_call_function.ToolCallFunction( + name = '', + arguments = '', ), ) + ], + tool_call_id = '', ) + ], + ) + """ + + def testAddInput(self): + """Test AddInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_operation.py b/test/test_add_operation.py new file mode 100644 index 0000000..df79db6 --- /dev/null +++ b/test/test_add_operation.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.add_operation import AddOperation + +class TestAddOperation(unittest.TestCase): + """AddOperation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddOperation: + """Test AddOperation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddOperation` + """ + model = AddOperation() + if include_optional: + return AddOperation( + reason = '', + action = 'add', + type = 'explicit_info', + data = None + ) + else: + return AddOperation( + action = 'add', + type = 'explicit_info', + data = None, + ) + """ + + def testAddOperation(self): + """Test AddOperation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_case_item.py b/test/test_agent_case_item.py new file mode 100644 index 0000000..ed43a25 --- /dev/null +++ b/test/test_agent_case_item.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.agent_case_item import AgentCaseItem + +class TestAgentCaseItem(unittest.TestCase): + """AgentCaseItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentCaseItem: + """Test AgentCaseItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentCaseItem` + """ + model = AgentCaseItem() + if include_optional: + return AgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + key_insight = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testAgentCaseItem(self): + """Test AgentCaseItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_skill_item.py b/test/test_agent_skill_item.py new file mode 100644 index 0000000..3dcc9b3 --- /dev/null +++ b/test/test_agent_skill_item.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.agent_skill_item import AgentSkillItem + +class TestAgentSkillItem(unittest.TestCase): + """AgentSkillItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSkillItem: + """Test AgentSkillItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSkillItem` + """ + model = AgentSkillItem() + if include_optional: + return AgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + source_case_ids = [ + '' + ] + ) + else: + return AgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + ) + """ + + def testAgentSkillItem(self): + """Test AgentSkillItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_atomic_fact_item.py b/test/test_atomic_fact_item.py new file mode 100644 index 0000000..8bcd219 --- /dev/null +++ b/test/test_atomic_fact_item.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.atomic_fact_item import AtomicFactItem + +class TestAtomicFactItem(unittest.TestCase): + """AtomicFactItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AtomicFactItem: + """Test AtomicFactItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AtomicFactItem` + """ + model = AtomicFactItem() + if include_optional: + return AtomicFactItem( + id = '', + content = '' + ) + else: + return AtomicFactItem( + id = '', + content = '', + ) + """ + + def testAtomicFactItem(self): + """Test AtomicFactItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_content.py b/test/test_content.py new file mode 100644 index 0000000..676be23 --- /dev/null +++ b/test/test_content.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.content import Content + +class TestContent(unittest.TestCase): + """Content unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Content: + """Test Content + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Content` + """ + model = Content() + if include_optional: + return Content( + ) + else: + return Content( + ) + """ + + def testContent(self): + """Test Content""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_content_item.py b/test/test_content_item.py new file mode 100644 index 0000000..950572f --- /dev/null +++ b/test/test_content_item.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.content_item import ContentItem + +class TestContentItem(unittest.TestCase): + """ContentItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ContentItem: + """Test ContentItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ContentItem` + """ + model = ContentItem() + if include_optional: + return ContentItem( + type = 'text', + text = '', + source = '', + var_base64 = '', + uri = '', + ext = '', + name = '', + source_info = { }, + extras = { } + ) + else: + return ContentItem( + type = 'text', + ) + """ + + def testContentItem(self): + """Test ContentItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_data.py b/test/test_data.py new file mode 100644 index 0000000..f8c69cc --- /dev/null +++ b/test/test_data.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.data import Data + +class TestData(unittest.TestCase): + """Data unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Data: + """Test Data + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Data` + """ + model = Data() + if include_optional: + return Data( + category = '0', + description = '0', + trait = '0' + ) + else: + return Data( + category = '0', + description = '0', + trait = '0', + ) + """ + + def testData(self): + """Test Data""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_data1.py b/test/test_data1.py new file mode 100644 index 0000000..9817a0f --- /dev/null +++ b/test/test_data1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.data1 import Data1 + +class TestData1(unittest.TestCase): + """Data1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Data1: + """Test Data1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Data1` + """ + model = Data1() + if include_optional: + return Data1( + category = '0', + description = '0', + trait = '0' + ) + else: + return Data1( + ) + """ + + def testData1(self): + """Test Data1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_data.py b/test/test_delete_data.py new file mode 100644 index 0000000..d27f242 --- /dev/null +++ b/test/test_delete_data.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.delete_data import DeleteData + +class TestDeleteData(unittest.TestCase): + """DeleteData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteData: + """Test DeleteData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteData` + """ + model = DeleteData() + if include_optional: + return DeleteData( + filters = [ + '' + ], + count = 56 + ) + else: + return DeleteData( + ) + """ + + def testDeleteData(self): + """Test DeleteData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_input.py b/test/test_delete_input.py new file mode 100644 index 0000000..e262807 --- /dev/null +++ b/test/test_delete_input.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.delete_input import DeleteInput + +class TestDeleteInput(unittest.TestCase): + """DeleteInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteInput: + """Test DeleteInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteInput` + """ + model = DeleteInput() + if include_optional: + return DeleteInput( + app_id = 'default', + project_id = 'default', + user_id = '0', + agent_id = '0', + session_id = '' + ) + else: + return DeleteInput( + ) + """ + + def testDeleteInput(self): + """Test DeleteInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_operation.py b/test/test_delete_operation.py new file mode 100644 index 0000000..602b31b --- /dev/null +++ b/test/test_delete_operation.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.delete_operation import DeleteOperation + +class TestDeleteOperation(unittest.TestCase): + """DeleteOperation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteOperation: + """Test DeleteOperation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteOperation` + """ + model = DeleteOperation() + if include_optional: + return DeleteOperation( + reason = '', + action = 'delete', + type = 'explicit_info', + item_id = '' + ) + else: + return DeleteOperation( + action = 'delete', + type = 'explicit_info', + item_id = '', + ) + """ + + def testDeleteOperation(self): + """Test DeleteOperation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_data.py b/test/test_edit_data.py new file mode 100644 index 0000000..877fe55 --- /dev/null +++ b/test/test_edit_data.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.edit_data import EditData + +class TestEditData(unittest.TestCase): + """EditData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EditData: + """Test EditData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EditData` + """ + model = EditData() + if include_optional: + return EditData( + user_id = '', + version = 56, + applied = 56, + results = [ + everos_cloud.models.edit_result_item.EditResultItem( + op_index = 56, + action = '', + type = '', + status = 'applied', + item_id = '', + new_item_id = '', + error = '', ) + ], + profile = { } + ) + else: + return EditData( + user_id = '', + version = 56, + applied = 56, + ) + """ + + def testEditData(self): + """Test EditData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_input.py b/test/test_edit_input.py new file mode 100644 index 0000000..cd78a90 --- /dev/null +++ b/test/test_edit_input.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.edit_input import EditInput + +class TestEditInput(unittest.TestCase): + """EditInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EditInput: + """Test EditInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EditInput` + """ + model = EditInput() + if include_optional: + return EditInput( + app_id = 'default', + project_id = 'default', + user_id = '0', + memory_type = 'profile', + operations = [ + null + ] + ) + else: + return EditInput( + user_id = '0', + operations = [ + null + ], + ) + """ + + def testEditInput(self): + """Test EditInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_input_operations_inner.py b/test/test_edit_input_operations_inner.py new file mode 100644 index 0000000..6c465f2 --- /dev/null +++ b/test/test_edit_input_operations_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.edit_input_operations_inner import EditInputOperationsInner + +class TestEditInputOperationsInner(unittest.TestCase): + """EditInputOperationsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EditInputOperationsInner: + """Test EditInputOperationsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EditInputOperationsInner` + """ + model = EditInputOperationsInner() + if include_optional: + return EditInputOperationsInner( + reason = '', + action = 'delete', + type = 'explicit_info', + data = None, + item_id = '' + ) + else: + return EditInputOperationsInner( + action = 'delete', + type = 'explicit_info', + data = None, + item_id = '', + ) + """ + + def testEditInputOperationsInner(self): + """Test EditInputOperationsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_result_item.py b/test/test_edit_result_item.py new file mode 100644 index 0000000..37a081f --- /dev/null +++ b/test/test_edit_result_item.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.edit_result_item import EditResultItem + +class TestEditResultItem(unittest.TestCase): + """EditResultItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EditResultItem: + """Test EditResultItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EditResultItem` + """ + model = EditResultItem() + if include_optional: + return EditResultItem( + op_index = 56, + action = '', + type = '', + status = 'applied', + item_id = '', + new_item_id = '', + error = '' + ) + else: + return EditResultItem( + op_index = 56, + action = '', + type = '', + status = 'applied', + ) + """ + + def testEditResultItem(self): + """Test EditResultItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_envelope.py b/test/test_envelope.py new file mode 100644 index 0000000..76a03e3 --- /dev/null +++ b/test/test_envelope.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.envelope import Envelope + +class TestEnvelope(unittest.TestCase): + """Envelope unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Envelope: + """Test Envelope + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Envelope` + """ + model = Envelope() + if include_optional: + return Envelope( + error = '', + request_id = '', + status = 56, + result = everos_cloud.models.envelope_result.Envelope_result( + data = null, ) + ) + else: + return Envelope( + ) + """ + + def testEnvelope(self): + """Test Envelope""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_envelope_result.py b/test/test_envelope_result.py new file mode 100644 index 0000000..0692e2a --- /dev/null +++ b/test/test_envelope_result.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.envelope_result import EnvelopeResult + +class TestEnvelopeResult(unittest.TestCase): + """EnvelopeResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnvelopeResult: + """Test EnvelopeResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnvelopeResult` + """ + model = EnvelopeResult() + if include_optional: + return EnvelopeResult( + data = None + ) + else: + return EnvelopeResult( + ) + """ + + def testEnvelopeResult(self): + """Test EnvelopeResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_episode_item.py b/test/test_episode_item.py new file mode 100644 index 0000000..9c87714 --- /dev/null +++ b/test/test_episode_item.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.episode_item import EpisodeItem + +class TestEpisodeItem(unittest.TestCase): + """EpisodeItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EpisodeItem: + """Test EpisodeItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EpisodeItem` + """ + model = EpisodeItem() + if include_optional: + return EpisodeItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + session_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sender_ids = [ + '' + ], + summary = '', + subject = '', + episode = '', + type = '', + atomic_facts = [ + everos_cloud.models.atomic_fact_item.AtomicFactItem( + id = '', + content = '', ) + ] + ) + else: + return EpisodeItem( + id = '', + app_id = '', + project_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + summary = '', + subject = '', + episode = '', + type = '', + ) + """ + + def testEpisodeItem(self): + """Test EpisodeItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_explicit_info_data.py b/test/test_explicit_info_data.py new file mode 100644 index 0000000..ba837e0 --- /dev/null +++ b/test/test_explicit_info_data.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.explicit_info_data import ExplicitInfoData + +class TestExplicitInfoData(unittest.TestCase): + """ExplicitInfoData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExplicitInfoData: + """Test ExplicitInfoData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExplicitInfoData` + """ + model = ExplicitInfoData() + if include_optional: + return ExplicitInfoData( + category = '0', + description = '0' + ) + else: + return ExplicitInfoData( + category = '0', + description = '0', + ) + """ + + def testExplicitInfoData(self): + """Test ExplicitInfoData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_explicit_info_patch.py b/test/test_explicit_info_patch.py new file mode 100644 index 0000000..b0308cb --- /dev/null +++ b/test/test_explicit_info_patch.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.explicit_info_patch import ExplicitInfoPatch + +class TestExplicitInfoPatch(unittest.TestCase): + """ExplicitInfoPatch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExplicitInfoPatch: + """Test ExplicitInfoPatch + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExplicitInfoPatch` + """ + model = ExplicitInfoPatch() + if include_optional: + return ExplicitInfoPatch( + category = '0', + description = '0' + ) + else: + return ExplicitInfoPatch( + ) + """ + + def testExplicitInfoPatch(self): + """Test ExplicitInfoPatch""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_filter_node.py b/test/test_filter_node.py new file mode 100644 index 0000000..86792c7 --- /dev/null +++ b/test/test_filter_node.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.filter_node import FilterNode + +class TestFilterNode(unittest.TestCase): + """FilterNode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FilterNode: + """Test FilterNode + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FilterNode` + """ + model = FilterNode() + if include_optional: + return FilterNode( + var_and = [ + { } + ], + var_or = [ + { } + ] + ) + else: + return FilterNode( + ) + """ + + def testFilterNode(self): + """Test FilterNode""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flush_data.py b/test/test_flush_data.py new file mode 100644 index 0000000..0feaca9 --- /dev/null +++ b/test/test_flush_data.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.flush_data import FlushData + +class TestFlushData(unittest.TestCase): + """FlushData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlushData: + """Test FlushData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlushData` + """ + model = FlushData() + if include_optional: + return FlushData( + status = 'extracted' + ) + else: + return FlushData( + status = 'extracted', + ) + """ + + def testFlushData(self): + """Test FlushData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flush_input.py b/test/test_flush_input.py new file mode 100644 index 0000000..e380305 --- /dev/null +++ b/test/test_flush_input.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.flush_input import FlushInput + +class TestFlushInput(unittest.TestCase): + """FlushInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlushInput: + """Test FlushInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlushInput` + """ + model = FlushInput() + if include_optional: + return FlushInput( + app_id = 'default', + project_id = 'default', + session_id = '0' + ) + else: + return FlushInput( + session_id = '0', + ) + """ + + def testFlushInput(self): + """Test FlushInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_data.py b/test/test_get_data.py new file mode 100644 index 0000000..0006531 --- /dev/null +++ b/test/test_get_data.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.get_data import GetData + +class TestGetData(unittest.TestCase): + """GetData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetData: + """Test GetData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetData` + """ + model = GetData() + if include_optional: + return GetData( + episodes = [ + everos_cloud.models.episode_item.EpisodeItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + session_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sender_ids = [ + '' + ], + summary = '', + subject = '', + episode = '', + type = '', + atomic_facts = [ + everos_cloud.models.atomic_fact_item.AtomicFactItem( + id = '', + content = '', ) + ], ) + ], + profiles = [ + everos_cloud.models.profile_item.ProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + profile_data = { }, ) + ], + agent_cases = [ + everos_cloud.models.agent_case_item.AgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + key_insight = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + agent_skills = [ + everos_cloud.models.agent_skill_item.AgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + source_case_ids = [ + '' + ], ) + ], + total_count = 56, + count = 56 + ) + else: + return GetData( + ) + """ + + def testGetData(self): + """Test GetData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_input.py b/test/test_get_input.py new file mode 100644 index 0000000..16d2d03 --- /dev/null +++ b/test/test_get_input.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.get_input import GetInput + +class TestGetInput(unittest.TestCase): + """GetInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetInput: + """Test GetInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetInput` + """ + model = GetInput() + if include_optional: + return GetInput( + app_id = 'default', + project_id = 'default', + user_id = '0', + agent_id = '0', + memory_type = 'episode', + page = 1.0, + page_size = 1.0, + sort_by = 'timestamp', + sort_order = 'desc', + filters = { } + ) + else: + return GetInput( + memory_type = 'episode', + ) + """ + + def testGetInput(self): + """Test GetInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_http_validation_error.py b/test/test_http_validation_error.py new file mode 100644 index 0000000..bb21b40 --- /dev/null +++ b/test/test_http_validation_error.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.http_validation_error import HTTPValidationError + +class TestHTTPValidationError(unittest.TestCase): + """HTTPValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HTTPValidationError: + """Test HTTPValidationError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HTTPValidationError` + """ + model = HTTPValidationError() + if include_optional: + return HTTPValidationError( + detail = [ + everos_cloud.models.validation_error.ValidationError( + loc = [ + null + ], + msg = '', + type = '', ) + ] + ) + else: + return HTTPValidationError( + ) + """ + + def testHTTPValidationError(self): + """Test HTTPValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_implicit_trait_data.py b/test/test_implicit_trait_data.py new file mode 100644 index 0000000..7bc141d --- /dev/null +++ b/test/test_implicit_trait_data.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.implicit_trait_data import ImplicitTraitData + +class TestImplicitTraitData(unittest.TestCase): + """ImplicitTraitData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImplicitTraitData: + """Test ImplicitTraitData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImplicitTraitData` + """ + model = ImplicitTraitData() + if include_optional: + return ImplicitTraitData( + trait = '0', + description = '0' + ) + else: + return ImplicitTraitData( + trait = '0', + description = '0', + ) + """ + + def testImplicitTraitData(self): + """Test ImplicitTraitData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_implicit_trait_patch.py b/test/test_implicit_trait_patch.py new file mode 100644 index 0000000..c297a6c --- /dev/null +++ b/test/test_implicit_trait_patch.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.implicit_trait_patch import ImplicitTraitPatch + +class TestImplicitTraitPatch(unittest.TestCase): + """ImplicitTraitPatch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImplicitTraitPatch: + """Test ImplicitTraitPatch + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImplicitTraitPatch` + """ + model = ImplicitTraitPatch() + if include_optional: + return ImplicitTraitPatch( + trait = '0', + description = '0' + ) + else: + return ImplicitTraitPatch( + ) + """ + + def testImplicitTraitPatch(self): + """Test ImplicitTraitPatch""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_memory_api.py b/test/test_memory_api.py new file mode 100644 index 0000000..47e2672 --- /dev/null +++ b/test/test_memory_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.api.memory_api import MemoryApi + + +class TestMemoryApi(unittest.TestCase): + """MemoryApi unit test stubs""" + + def setUp(self) -> None: + self.api = MemoryApi() + + def tearDown(self) -> None: + pass + + def test_add_memory(self) -> None: + """Test case for add_memory + + Add messages [OSS + Cloud] + """ + pass + + def test_delete_memory(self) -> None: + """Test case for delete_memory + + Delete memories [Cloud-only] + """ + pass + + def test_edit_profile(self) -> None: + """Test case for edit_profile + + Edit profile items [Cloud-only] + """ + pass + + def test_flush_api_v2_memory_flush_post(self) -> None: + """Test case for flush_api_v2_memory_flush_post + + Force boundary detection + extraction [OSS + Cloud] + """ + pass + + def test_get_memory(self) -> None: + """Test case for get_memory + + Get memories (paginated) [OSS + Cloud] + """ + pass + + def test_search_memory(self) -> None: + """Test case for search_memory + + Search memories [OSS + Cloud] + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_item.py b/test/test_message_item.py new file mode 100644 index 0000000..e2cb8ce --- /dev/null +++ b/test/test_message_item.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.message_item import MessageItem + +class TestMessageItem(unittest.TestCase): + """MessageItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageItem: + """Test MessageItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageItem` + """ + model = MessageItem() + if include_optional: + return MessageItem( + sender_id = '', + sender_name = '', + role = 'user', + timestamp = 56, + content = None, + tool_calls = [ + everos_cloud.models.tool_call.ToolCall( + id = '', + type = 'function', + function = everos_cloud.models.tool_call_function.ToolCallFunction( + name = '', + arguments = '', ), ) + ], + tool_call_id = '' + ) + else: + return MessageItem( + sender_id = '', + role = 'user', + timestamp = 56, + content = None, + ) + """ + + def testMessageItem(self): + """Test MessageItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_profile_item.py b/test/test_profile_item.py new file mode 100644 index 0000000..a61d517 --- /dev/null +++ b/test/test_profile_item.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.profile_item import ProfileItem + +class TestProfileItem(unittest.TestCase): + """ProfileItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProfileItem: + """Test ProfileItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProfileItem` + """ + model = ProfileItem() + if include_optional: + return ProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + profile_data = { } + ) + else: + return ProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + ) + """ + + def testProfileItem(self): + """Test ProfileItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_agent_case_item.py b/test/test_search_agent_case_item.py new file mode 100644 index 0000000..b635717 --- /dev/null +++ b/test/test_search_agent_case_item.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.search_agent_case_item import SearchAgentCaseItem + +class TestSearchAgentCaseItem(unittest.TestCase): + """SearchAgentCaseItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchAgentCaseItem: + """Test SearchAgentCaseItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchAgentCaseItem` + """ + model = SearchAgentCaseItem() + if include_optional: + return SearchAgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + key_insight = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + score = 1.337 + ) + else: + return SearchAgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + score = 1.337, + ) + """ + + def testSearchAgentCaseItem(self): + """Test SearchAgentCaseItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_agent_skill_item.py b/test/test_search_agent_skill_item.py new file mode 100644 index 0000000..7489de1 --- /dev/null +++ b/test/test_search_agent_skill_item.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.search_agent_skill_item import SearchAgentSkillItem + +class TestSearchAgentSkillItem(unittest.TestCase): + """SearchAgentSkillItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchAgentSkillItem: + """Test SearchAgentSkillItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchAgentSkillItem` + """ + model = SearchAgentSkillItem() + if include_optional: + return SearchAgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + source_case_ids = [ + '' + ], + score = 1.337 + ) + else: + return SearchAgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + score = 1.337, + ) + """ + + def testSearchAgentSkillItem(self): + """Test SearchAgentSkillItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_atomic_fact_item.py b/test/test_search_atomic_fact_item.py new file mode 100644 index 0000000..a192d46 --- /dev/null +++ b/test/test_search_atomic_fact_item.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.search_atomic_fact_item import SearchAtomicFactItem + +class TestSearchAtomicFactItem(unittest.TestCase): + """SearchAtomicFactItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchAtomicFactItem: + """Test SearchAtomicFactItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchAtomicFactItem` + """ + model = SearchAtomicFactItem() + if include_optional: + return SearchAtomicFactItem( + id = '', + content = '', + score = 1.337 + ) + else: + return SearchAtomicFactItem( + id = '', + content = '', + score = 1.337, + ) + """ + + def testSearchAtomicFactItem(self): + """Test SearchAtomicFactItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_data.py b/test/test_search_data.py new file mode 100644 index 0000000..966db74 --- /dev/null +++ b/test/test_search_data.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.search_data import SearchData + +class TestSearchData(unittest.TestCase): + """SearchData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchData: + """Test SearchData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchData` + """ + model = SearchData() + if include_optional: + return SearchData( + episodes = [ + everos_cloud.models.search_episode_item.SearchEpisodeItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + session_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sender_ids = [ + '' + ], + summary = '', + subject = '', + episode = '', + type = '', + atomic_facts = [ + everos_cloud.models.search_atomic_fact_item.SearchAtomicFactItem( + id = '', + content = '', + score = 1.337, ) + ], + score = 1.337, ) + ], + profiles = [ + everos_cloud.models.search_profile_item.SearchProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + profile_data = { }, + score = 1.337, ) + ], + agent_cases = [ + everos_cloud.models.search_agent_case_item.SearchAgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + key_insight = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + score = 1.337, ) + ], + agent_skills = [ + everos_cloud.models.search_agent_skill_item.SearchAgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + source_case_ids = [ + '' + ], + score = 1.337, ) + ], + unprocessed_messages = [ + everos_cloud.models.unprocessed_message_dto.UnprocessedMessageDTO( + id = '', + app_id = '', + project_id = '', + session_id = '', + sender_id = '', + sender_name = '', + role = 'user', + content = null, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tool_calls = [ + everos_cloud.models.tool_call.ToolCall( + id = '', + type = 'function', + function = everos_cloud.models.tool_call_function.ToolCallFunction( + name = '', + arguments = '', ), ) + ], + tool_call_id = '', ) + ] + ) + else: + return SearchData( + ) + """ + + def testSearchData(self): + """Test SearchData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_episode_item.py b/test/test_search_episode_item.py new file mode 100644 index 0000000..73fa987 --- /dev/null +++ b/test/test_search_episode_item.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.search_episode_item import SearchEpisodeItem + +class TestSearchEpisodeItem(unittest.TestCase): + """SearchEpisodeItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchEpisodeItem: + """Test SearchEpisodeItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchEpisodeItem` + """ + model = SearchEpisodeItem() + if include_optional: + return SearchEpisodeItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + session_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sender_ids = [ + '' + ], + summary = '', + subject = '', + episode = '', + type = '', + atomic_facts = [ + everos_cloud.models.search_atomic_fact_item.SearchAtomicFactItem( + id = '', + content = '', + score = 1.337, ) + ], + score = 1.337 + ) + else: + return SearchEpisodeItem( + id = '', + app_id = '', + project_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + summary = '', + subject = '', + episode = '', + type = '', + score = 1.337, + ) + """ + + def testSearchEpisodeItem(self): + """Test SearchEpisodeItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_input.py b/test/test_search_input.py new file mode 100644 index 0000000..6b63ecd --- /dev/null +++ b/test/test_search_input.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.search_input import SearchInput + +class TestSearchInput(unittest.TestCase): + """SearchInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchInput: + """Test SearchInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchInput` + """ + model = SearchInput() + if include_optional: + return SearchInput( + app_id = 'default', + project_id = 'default', + user_id = '0', + agent_id = '0', + query = '0', + method = 'hybrid', + top_k = 56, + radius = 0.0, + min_score = 0.0, + include_profile = True, + enable_llm_rerank = True, + filters = { } + ) + else: + return SearchInput( + query = '0', + ) + """ + + def testSearchInput(self): + """Test SearchInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_profile_item.py b/test/test_search_profile_item.py new file mode 100644 index 0000000..5d08ac1 --- /dev/null +++ b/test/test_search_profile_item.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.search_profile_item import SearchProfileItem + +class TestSearchProfileItem(unittest.TestCase): + """SearchProfileItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchProfileItem: + """Test SearchProfileItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchProfileItem` + """ + model = SearchProfileItem() + if include_optional: + return SearchProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + profile_data = { }, + score = 1.337 + ) + else: + return SearchProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + ) + """ + + def testSearchProfileItem(self): + """Test SearchProfileItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sign_envelope.py b/test/test_sign_envelope.py new file mode 100644 index 0000000..a163e20 --- /dev/null +++ b/test/test_sign_envelope.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.sign_envelope import SignEnvelope + +class TestSignEnvelope(unittest.TestCase): + """SignEnvelope unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SignEnvelope: + """Test SignEnvelope + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SignEnvelope` + """ + model = SignEnvelope() + if include_optional: + return SignEnvelope( + error = '', + request_id = '', + status = 56, + result = everos_cloud.models.sign_envelope_all_of_result.SignEnvelope_allOf_result( + data = everos_cloud.models.sign_response.SignResponse( + object_list = [ + everos_cloud.models.sign_response_item.SignResponseItem( + file_id = '', + file_name = '', + file_type = '', + object_key = '', + object_url = '', + object_signed_info = everos_cloud.models.signed_info.SignedInfo( + url = '', + fields = { + 'key' : '' + }, + max_size = 56, ), ) + ], ), ) + ) + else: + return SignEnvelope( + ) + """ + + def testSignEnvelope(self): + """Test SignEnvelope""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sign_envelope_all_of_result.py b/test/test_sign_envelope_all_of_result.py new file mode 100644 index 0000000..290577c --- /dev/null +++ b/test/test_sign_envelope_all_of_result.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.sign_envelope_all_of_result import SignEnvelopeAllOfResult + +class TestSignEnvelopeAllOfResult(unittest.TestCase): + """SignEnvelopeAllOfResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SignEnvelopeAllOfResult: + """Test SignEnvelopeAllOfResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SignEnvelopeAllOfResult` + """ + model = SignEnvelopeAllOfResult() + if include_optional: + return SignEnvelopeAllOfResult( + data = everos_cloud.models.sign_response.SignResponse( + object_list = [ + everos_cloud.models.sign_response_item.SignResponseItem( + file_id = '', + file_name = '', + file_type = '', + object_key = '', + object_url = '', + object_signed_info = everos_cloud.models.signed_info.SignedInfo( + url = '', + fields = { + 'key' : '' + }, + max_size = 56, ), ) + ], ) + ) + else: + return SignEnvelopeAllOfResult( + ) + """ + + def testSignEnvelopeAllOfResult(self): + """Test SignEnvelopeAllOfResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sign_object_item.py b/test/test_sign_object_item.py new file mode 100644 index 0000000..f3a05d5 --- /dev/null +++ b/test/test_sign_object_item.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.sign_object_item import SignObjectItem + +class TestSignObjectItem(unittest.TestCase): + """SignObjectItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SignObjectItem: + """Test SignObjectItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SignObjectItem` + """ + model = SignObjectItem() + if include_optional: + return SignObjectItem( + file_id = '', + file_name = '', + file_type = 'image' + ) + else: + return SignObjectItem( + file_id = '', + file_name = '', + file_type = 'image', + ) + """ + + def testSignObjectItem(self): + """Test SignObjectItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sign_request.py b/test/test_sign_request.py new file mode 100644 index 0000000..efe34e4 --- /dev/null +++ b/test/test_sign_request.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.sign_request import SignRequest + +class TestSignRequest(unittest.TestCase): + """SignRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SignRequest: + """Test SignRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SignRequest` + """ + model = SignRequest() + if include_optional: + return SignRequest( + object_list = [ + everos_cloud.models.sign_object_item.SignObjectItem( + file_id = '', + file_name = '', + file_type = 'image', ) + ] + ) + else: + return SignRequest( + object_list = [ + everos_cloud.models.sign_object_item.SignObjectItem( + file_id = '', + file_name = '', + file_type = 'image', ) + ], + ) + """ + + def testSignRequest(self): + """Test SignRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sign_response.py b/test/test_sign_response.py new file mode 100644 index 0000000..138dcc7 --- /dev/null +++ b/test/test_sign_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.sign_response import SignResponse + +class TestSignResponse(unittest.TestCase): + """SignResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SignResponse: + """Test SignResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SignResponse` + """ + model = SignResponse() + if include_optional: + return SignResponse( + object_list = [ + everos_cloud.models.sign_response_item.SignResponseItem( + file_id = '', + file_name = '', + file_type = '', + object_key = '', + object_url = '', + object_signed_info = everos_cloud.models.signed_info.SignedInfo( + url = '', + fields = { + 'key' : '' + }, + max_size = 56, ), ) + ] + ) + else: + return SignResponse( + ) + """ + + def testSignResponse(self): + """Test SignResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sign_response_item.py b/test/test_sign_response_item.py new file mode 100644 index 0000000..8e484a7 --- /dev/null +++ b/test/test_sign_response_item.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.sign_response_item import SignResponseItem + +class TestSignResponseItem(unittest.TestCase): + """SignResponseItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SignResponseItem: + """Test SignResponseItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SignResponseItem` + """ + model = SignResponseItem() + if include_optional: + return SignResponseItem( + file_id = '', + file_name = '', + file_type = '', + object_key = '', + object_url = '', + object_signed_info = everos_cloud.models.signed_info.SignedInfo( + url = '', + fields = { + 'key' : '' + }, + max_size = 56, ) + ) + else: + return SignResponseItem( + ) + """ + + def testSignResponseItem(self): + """Test SignResponseItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_signed_info.py b/test/test_signed_info.py new file mode 100644 index 0000000..027a1c5 --- /dev/null +++ b/test/test_signed_info.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.signed_info import SignedInfo + +class TestSignedInfo(unittest.TestCase): + """SignedInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SignedInfo: + """Test SignedInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SignedInfo` + """ + model = SignedInfo() + if include_optional: + return SignedInfo( + url = '', + fields = { + 'key' : '' + }, + max_size = 56 + ) + else: + return SignedInfo( + ) + """ + + def testSignedInfo(self): + """Test SignedInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_api.py b/test/test_storage_api.py new file mode 100644 index 0000000..a6b49d7 --- /dev/null +++ b/test/test_storage_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.api.storage_api import StorageApi + + +class TestStorageApi(unittest.TestCase): + """StorageApi unit test stubs""" + + def setUp(self) -> None: + self.api = StorageApi() + + def tearDown(self) -> None: + pass + + def test_sign_objects(self) -> None: + """Test case for sign_objects + + Upload multimodal data (generate presigned upload info) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_success_envelope_add_data.py b/test/test_success_envelope_add_data.py new file mode 100644 index 0000000..7b72024 --- /dev/null +++ b/test/test_success_envelope_add_data.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.success_envelope_add_data import SuccessEnvelopeAddData + +class TestSuccessEnvelopeAddData(unittest.TestCase): + """SuccessEnvelopeAddData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SuccessEnvelopeAddData: + """Test SuccessEnvelopeAddData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SuccessEnvelopeAddData` + """ + model = SuccessEnvelopeAddData() + if include_optional: + return SuccessEnvelopeAddData( + request_id = '', + data = everos_cloud.models.add_data.AddData( + message_count = 56, + status = 'accumulated', ) + ) + else: + return SuccessEnvelopeAddData( + request_id = '', + data = everos_cloud.models.add_data.AddData( + message_count = 56, + status = 'accumulated', ), + ) + """ + + def testSuccessEnvelopeAddData(self): + """Test SuccessEnvelopeAddData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_success_envelope_delete_data.py b/test/test_success_envelope_delete_data.py new file mode 100644 index 0000000..98c7acd --- /dev/null +++ b/test/test_success_envelope_delete_data.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.success_envelope_delete_data import SuccessEnvelopeDeleteData + +class TestSuccessEnvelopeDeleteData(unittest.TestCase): + """SuccessEnvelopeDeleteData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SuccessEnvelopeDeleteData: + """Test SuccessEnvelopeDeleteData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SuccessEnvelopeDeleteData` + """ + model = SuccessEnvelopeDeleteData() + if include_optional: + return SuccessEnvelopeDeleteData( + request_id = '', + data = everos_cloud.models.delete_data.DeleteData( + filters = [ + '' + ], + count = 56, ) + ) + else: + return SuccessEnvelopeDeleteData( + request_id = '', + data = everos_cloud.models.delete_data.DeleteData( + filters = [ + '' + ], + count = 56, ), + ) + """ + + def testSuccessEnvelopeDeleteData(self): + """Test SuccessEnvelopeDeleteData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_success_envelope_edit_data.py b/test/test_success_envelope_edit_data.py new file mode 100644 index 0000000..520a260 --- /dev/null +++ b/test/test_success_envelope_edit_data.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.success_envelope_edit_data import SuccessEnvelopeEditData + +class TestSuccessEnvelopeEditData(unittest.TestCase): + """SuccessEnvelopeEditData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SuccessEnvelopeEditData: + """Test SuccessEnvelopeEditData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SuccessEnvelopeEditData` + """ + model = SuccessEnvelopeEditData() + if include_optional: + return SuccessEnvelopeEditData( + request_id = '', + data = everos_cloud.models.edit_data.EditData( + user_id = '', + version = 56, + applied = 56, + results = [ + everos_cloud.models.edit_result_item.EditResultItem( + op_index = 56, + action = '', + type = '', + status = 'applied', + item_id = '', + new_item_id = '', + error = '', ) + ], + profile = { }, ) + ) + else: + return SuccessEnvelopeEditData( + request_id = '', + data = everos_cloud.models.edit_data.EditData( + user_id = '', + version = 56, + applied = 56, + results = [ + everos_cloud.models.edit_result_item.EditResultItem( + op_index = 56, + action = '', + type = '', + status = 'applied', + item_id = '', + new_item_id = '', + error = '', ) + ], + profile = { }, ), + ) + """ + + def testSuccessEnvelopeEditData(self): + """Test SuccessEnvelopeEditData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_success_envelope_flush_data.py b/test/test_success_envelope_flush_data.py new file mode 100644 index 0000000..2fad007 --- /dev/null +++ b/test/test_success_envelope_flush_data.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.success_envelope_flush_data import SuccessEnvelopeFlushData + +class TestSuccessEnvelopeFlushData(unittest.TestCase): + """SuccessEnvelopeFlushData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SuccessEnvelopeFlushData: + """Test SuccessEnvelopeFlushData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SuccessEnvelopeFlushData` + """ + model = SuccessEnvelopeFlushData() + if include_optional: + return SuccessEnvelopeFlushData( + request_id = '', + data = everos_cloud.models.flush_data.FlushData( + status = 'extracted', ) + ) + else: + return SuccessEnvelopeFlushData( + request_id = '', + data = everos_cloud.models.flush_data.FlushData( + status = 'extracted', ), + ) + """ + + def testSuccessEnvelopeFlushData(self): + """Test SuccessEnvelopeFlushData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_success_envelope_get_data.py b/test/test_success_envelope_get_data.py new file mode 100644 index 0000000..805a4c6 --- /dev/null +++ b/test/test_success_envelope_get_data.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.success_envelope_get_data import SuccessEnvelopeGetData + +class TestSuccessEnvelopeGetData(unittest.TestCase): + """SuccessEnvelopeGetData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SuccessEnvelopeGetData: + """Test SuccessEnvelopeGetData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SuccessEnvelopeGetData` + """ + model = SuccessEnvelopeGetData() + if include_optional: + return SuccessEnvelopeGetData( + request_id = '', + data = everos_cloud.models.get_data.GetData( + episodes = [ + everos_cloud.models.episode_item.EpisodeItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + session_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sender_ids = [ + '' + ], + summary = '', + subject = '', + episode = '', + type = '', + atomic_facts = [ + everos_cloud.models.atomic_fact_item.AtomicFactItem( + id = '', + content = '', ) + ], ) + ], + profiles = [ + everos_cloud.models.profile_item.ProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + profile_data = { }, ) + ], + agent_cases = [ + everos_cloud.models.agent_case_item.AgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + key_insight = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + agent_skills = [ + everos_cloud.models.agent_skill_item.AgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + source_case_ids = [ + '' + ], ) + ], + total_count = 56, + count = 56, ) + ) + else: + return SuccessEnvelopeGetData( + request_id = '', + data = everos_cloud.models.get_data.GetData( + episodes = [ + everos_cloud.models.episode_item.EpisodeItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + session_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sender_ids = [ + '' + ], + summary = '', + subject = '', + episode = '', + type = '', + atomic_facts = [ + everos_cloud.models.atomic_fact_item.AtomicFactItem( + id = '', + content = '', ) + ], ) + ], + profiles = [ + everos_cloud.models.profile_item.ProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + profile_data = { }, ) + ], + agent_cases = [ + everos_cloud.models.agent_case_item.AgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + key_insight = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + agent_skills = [ + everos_cloud.models.agent_skill_item.AgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + source_case_ids = [ + '' + ], ) + ], + total_count = 56, + count = 56, ), + ) + """ + + def testSuccessEnvelopeGetData(self): + """Test SuccessEnvelopeGetData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_success_envelope_search_data.py b/test/test_success_envelope_search_data.py new file mode 100644 index 0000000..97116ae --- /dev/null +++ b/test/test_success_envelope_search_data.py @@ -0,0 +1,221 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.success_envelope_search_data import SuccessEnvelopeSearchData + +class TestSuccessEnvelopeSearchData(unittest.TestCase): + """SuccessEnvelopeSearchData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SuccessEnvelopeSearchData: + """Test SuccessEnvelopeSearchData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SuccessEnvelopeSearchData` + """ + model = SuccessEnvelopeSearchData() + if include_optional: + return SuccessEnvelopeSearchData( + request_id = '', + data = everos_cloud.models.search_data.SearchData( + episodes = [ + everos_cloud.models.search_episode_item.SearchEpisodeItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + session_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sender_ids = [ + '' + ], + summary = '', + subject = '', + episode = '', + type = '', + atomic_facts = [ + everos_cloud.models.search_atomic_fact_item.SearchAtomicFactItem( + id = '', + content = '', + score = 1.337, ) + ], + score = 1.337, ) + ], + profiles = [ + everos_cloud.models.search_profile_item.SearchProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + profile_data = { }, + score = 1.337, ) + ], + agent_cases = [ + everos_cloud.models.search_agent_case_item.SearchAgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + key_insight = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + score = 1.337, ) + ], + agent_skills = [ + everos_cloud.models.search_agent_skill_item.SearchAgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + source_case_ids = [ + '' + ], + score = 1.337, ) + ], + unprocessed_messages = [ + everos_cloud.models.unprocessed_message_dto.UnprocessedMessageDTO( + id = '', + app_id = '', + project_id = '', + session_id = '', + sender_id = '', + sender_name = '', + role = 'user', + content = null, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tool_calls = [ + everos_cloud.models.tool_call.ToolCall( + id = '', + type = 'function', + function = everos_cloud.models.tool_call_function.ToolCallFunction( + name = '', + arguments = '', ), ) + ], + tool_call_id = '', ) + ], ) + ) + else: + return SuccessEnvelopeSearchData( + request_id = '', + data = everos_cloud.models.search_data.SearchData( + episodes = [ + everos_cloud.models.search_episode_item.SearchEpisodeItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + session_id = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sender_ids = [ + '' + ], + summary = '', + subject = '', + episode = '', + type = '', + atomic_facts = [ + everos_cloud.models.search_atomic_fact_item.SearchAtomicFactItem( + id = '', + content = '', + score = 1.337, ) + ], + score = 1.337, ) + ], + profiles = [ + everos_cloud.models.search_profile_item.SearchProfileItem( + id = '', + app_id = '', + project_id = '', + user_id = '', + profile_data = { }, + score = 1.337, ) + ], + agent_cases = [ + everos_cloud.models.search_agent_case_item.SearchAgentCaseItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + session_id = '', + task_intent = '', + approach = '', + quality_score = 1.337, + key_insight = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + score = 1.337, ) + ], + agent_skills = [ + everos_cloud.models.search_agent_skill_item.SearchAgentSkillItem( + id = '', + app_id = '', + project_id = '', + agent_id = '', + name = '', + description = '', + content = '', + confidence = 1.337, + maturity_score = 1.337, + source_case_ids = [ + '' + ], + score = 1.337, ) + ], + unprocessed_messages = [ + everos_cloud.models.unprocessed_message_dto.UnprocessedMessageDTO( + id = '', + app_id = '', + project_id = '', + session_id = '', + sender_id = '', + sender_name = '', + role = 'user', + content = null, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tool_calls = [ + everos_cloud.models.tool_call.ToolCall( + id = '', + type = 'function', + function = everos_cloud.models.tool_call_function.ToolCallFunction( + name = '', + arguments = '', ), ) + ], + tool_call_id = '', ) + ], ), + ) + """ + + def testSuccessEnvelopeSearchData(self): + """Test SuccessEnvelopeSearchData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tool_call.py b/test/test_tool_call.py new file mode 100644 index 0000000..56e8710 --- /dev/null +++ b/test/test_tool_call.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.tool_call import ToolCall + +class TestToolCall(unittest.TestCase): + """ToolCall unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ToolCall: + """Test ToolCall + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ToolCall` + """ + model = ToolCall() + if include_optional: + return ToolCall( + id = '', + type = 'function', + function = everos_cloud.models.tool_call_function.ToolCallFunction( + name = '', + arguments = '', ) + ) + else: + return ToolCall( + id = '', + function = everos_cloud.models.tool_call_function.ToolCallFunction( + name = '', + arguments = '', ), + ) + """ + + def testToolCall(self): + """Test ToolCall""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tool_call_function.py b/test/test_tool_call_function.py new file mode 100644 index 0000000..42149e8 --- /dev/null +++ b/test/test_tool_call_function.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.tool_call_function import ToolCallFunction + +class TestToolCallFunction(unittest.TestCase): + """ToolCallFunction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ToolCallFunction: + """Test ToolCallFunction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ToolCallFunction` + """ + model = ToolCallFunction() + if include_optional: + return ToolCallFunction( + name = '', + arguments = '' + ) + else: + return ToolCallFunction( + name = '', + arguments = '', + ) + """ + + def testToolCallFunction(self): + """Test ToolCallFunction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unprocessed_message_dto.py b/test/test_unprocessed_message_dto.py new file mode 100644 index 0000000..d69fd15 --- /dev/null +++ b/test/test_unprocessed_message_dto.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.unprocessed_message_dto import UnprocessedMessageDTO + +class TestUnprocessedMessageDTO(unittest.TestCase): + """UnprocessedMessageDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnprocessedMessageDTO: + """Test UnprocessedMessageDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnprocessedMessageDTO` + """ + model = UnprocessedMessageDTO() + if include_optional: + return UnprocessedMessageDTO( + id = '', + app_id = '', + project_id = '', + session_id = '', + sender_id = '', + sender_name = '', + role = 'user', + content = None, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tool_calls = [ + everos_cloud.models.tool_call.ToolCall( + id = '', + type = 'function', + function = everos_cloud.models.tool_call_function.ToolCallFunction( + name = '', + arguments = '', ), ) + ], + tool_call_id = '' + ) + else: + return UnprocessedMessageDTO( + id = '', + app_id = '', + project_id = '', + session_id = '', + sender_id = '', + role = 'user', + content = None, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testUnprocessedMessageDTO(self): + """Test UnprocessedMessageDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_operation.py b/test/test_update_operation.py new file mode 100644 index 0000000..a124eba --- /dev/null +++ b/test/test_update_operation.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.update_operation import UpdateOperation + +class TestUpdateOperation(unittest.TestCase): + """UpdateOperation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateOperation: + """Test UpdateOperation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateOperation` + """ + model = UpdateOperation() + if include_optional: + return UpdateOperation( + reason = '', + action = 'update', + type = 'explicit_info', + item_id = '', + data = None + ) + else: + return UpdateOperation( + action = 'update', + type = 'explicit_info', + item_id = '', + data = None, + ) + """ + + def testUpdateOperation(self): + """Test UpdateOperation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_validation_error.py b/test/test_validation_error.py new file mode 100644 index 0000000..8d94ba4 --- /dev/null +++ b/test/test_validation_error.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + loc = [ + null + ], + msg = '', + type = '' + ) + else: + return ValidationError( + loc = [ + null + ], + msg = '', + type = '', + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_validation_error_loc_inner.py b/test/test_validation_error_loc_inner.py new file mode 100644 index 0000000..0534ef6 --- /dev/null +++ b/test/test_validation_error_loc_inner.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + EverOS Cloud Memory API + + Official Python client for the EverOS Cloud Memory API. Add, search, retrieve, and manage long-term memory for your AI applications over a typed interface (pydantic v2, with full type hints). Install and usage guides: https://github.com/EverMind-AI/everos-cloud-sdk-python + + The version of the OpenAPI document: 2.0.0 + Contact: service@evermind.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from everos_cloud.models.validation_error_loc_inner import ValidationErrorLocInner + +class TestValidationErrorLocInner(unittest.TestCase): + """ValidationErrorLocInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorLocInner: + """Test ValidationErrorLocInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorLocInner` + """ + model = ValidationErrorLocInner() + if include_optional: + return ValidationErrorLocInner( + ) + else: + return ValidationErrorLocInner( + ) + """ + + def testValidationErrorLocInner(self): + """Test ValidationErrorLocInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..bb60e44 --- /dev/null +++ b/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=everos_cloud