hindsight-client 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hindsight_client/__init__.py +9 -8
- hindsight_client/hindsight_client.py +394 -59
- {hindsight_client-0.3.0.dist-info → hindsight_client-0.4.0.dist-info}/METADATA +1 -1
- hindsight_client-0.4.0.dist-info/RECORD +89 -0
- hindsight_client_api/__init__.py +24 -0
- hindsight_client_api/api/__init__.py +2 -0
- hindsight_client_api/api/banks_api.py +997 -131
- hindsight_client_api/api/directives_api.py +1619 -0
- hindsight_client_api/api/entities_api.py +9 -6
- hindsight_client_api/api/mental_models_api.py +1897 -0
- hindsight_client_api/api/monitoring_api.py +246 -0
- hindsight_client_api/api/operations_api.py +350 -4
- hindsight_client_api/models/__init__.py +22 -0
- hindsight_client_api/models/add_background_request.py +2 -2
- hindsight_client_api/models/async_operation_submit_response.py +89 -0
- hindsight_client_api/models/background_response.py +10 -3
- hindsight_client_api/models/bank_list_item.py +6 -6
- hindsight_client_api/models/bank_profile_response.py +11 -4
- hindsight_client_api/models/bank_stats_response.py +15 -4
- hindsight_client_api/models/consolidation_response.py +89 -0
- hindsight_client_api/models/create_bank_request.py +8 -1
- hindsight_client_api/models/create_directive_request.py +95 -0
- hindsight_client_api/models/create_mental_model_request.py +100 -0
- hindsight_client_api/models/create_mental_model_response.py +87 -0
- hindsight_client_api/models/directive_list_response.py +95 -0
- hindsight_client_api/models/directive_response.py +113 -0
- hindsight_client_api/models/features_info.py +91 -0
- hindsight_client_api/models/mental_model_list_response.py +95 -0
- hindsight_client_api/models/mental_model_response.py +126 -0
- hindsight_client_api/models/mental_model_trigger.py +87 -0
- hindsight_client_api/models/operation_response.py +1 -1
- hindsight_client_api/models/operation_status_response.py +131 -0
- hindsight_client_api/models/operations_list_response.py +8 -2
- hindsight_client_api/models/reflect_based_on.py +115 -0
- hindsight_client_api/models/reflect_directive.py +91 -0
- hindsight_client_api/models/reflect_include_options.py +13 -2
- hindsight_client_api/models/reflect_llm_call.py +89 -0
- hindsight_client_api/models/reflect_mental_model.py +96 -0
- hindsight_client_api/models/reflect_response.py +23 -11
- hindsight_client_api/models/reflect_tool_call.py +100 -0
- hindsight_client_api/models/reflect_trace.py +105 -0
- hindsight_client_api/models/tool_calls_include_options.py +87 -0
- hindsight_client_api/models/update_directive_request.py +120 -0
- hindsight_client_api/models/update_mental_model_request.py +125 -0
- hindsight_client_api/models/version_response.py +93 -0
- hindsight_client-0.3.0.dist-info/RECORD +0 -65
- {hindsight_client-0.3.0.dist-info → hindsight_client-0.4.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from hindsight_client_api.models.reflect_llm_call import ReflectLLMCall
|
|
23
|
+
from hindsight_client_api.models.reflect_tool_call import ReflectToolCall
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ReflectTrace(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Execution trace of LLM and tool calls during reflection.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
tool_calls: Optional[List[ReflectToolCall]] = Field(default=None, description="Tool calls made during reflection")
|
|
32
|
+
llm_calls: Optional[List[ReflectLLMCall]] = Field(default=None, description="LLM calls made during reflection")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["tool_calls", "llm_calls"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of ReflectTrace from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in tool_calls (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.tool_calls:
|
|
77
|
+
for _item_tool_calls in self.tool_calls:
|
|
78
|
+
if _item_tool_calls:
|
|
79
|
+
_items.append(_item_tool_calls.to_dict())
|
|
80
|
+
_dict['tool_calls'] = _items
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in llm_calls (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.llm_calls:
|
|
84
|
+
for _item_llm_calls in self.llm_calls:
|
|
85
|
+
if _item_llm_calls:
|
|
86
|
+
_items.append(_item_llm_calls.to_dict())
|
|
87
|
+
_dict['llm_calls'] = _items
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of ReflectTrace from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"tool_calls": [ReflectToolCall.from_dict(_item) for _item in obj["tool_calls"]] if obj.get("tool_calls") is not None else None,
|
|
101
|
+
"llm_calls": [ReflectLLMCall.from_dict(_item) for _item in obj["llm_calls"]] if obj.get("llm_calls") is not None else None
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ToolCallsIncludeOptions(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Options for including tool calls in reflect results.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
output: Optional[StrictBool] = Field(default=True, description="Include tool outputs in the trace. Set to false to only include inputs (smaller payload).")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["output"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of ToolCallsIncludeOptions from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of ToolCallsIncludeOptions from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"output": obj.get("output") if obj.get("output") is not None else True
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class UpdateDirectiveRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Request model for updating a directive.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
name: Optional[StrictStr] = None
|
|
30
|
+
content: Optional[StrictStr] = None
|
|
31
|
+
priority: Optional[StrictInt] = None
|
|
32
|
+
is_active: Optional[StrictBool] = None
|
|
33
|
+
tags: Optional[List[StrictStr]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["name", "content", "priority", "is_active", "tags"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of UpdateDirectiveRequest from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# set to None if name (nullable) is None
|
|
76
|
+
# and model_fields_set contains the field
|
|
77
|
+
if self.name is None and "name" in self.model_fields_set:
|
|
78
|
+
_dict['name'] = None
|
|
79
|
+
|
|
80
|
+
# set to None if content (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.content is None and "content" in self.model_fields_set:
|
|
83
|
+
_dict['content'] = None
|
|
84
|
+
|
|
85
|
+
# set to None if priority (nullable) is None
|
|
86
|
+
# and model_fields_set contains the field
|
|
87
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
88
|
+
_dict['priority'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if is_active (nullable) is None
|
|
91
|
+
# and model_fields_set contains the field
|
|
92
|
+
if self.is_active is None and "is_active" in self.model_fields_set:
|
|
93
|
+
_dict['is_active'] = None
|
|
94
|
+
|
|
95
|
+
# set to None if tags (nullable) is None
|
|
96
|
+
# and model_fields_set contains the field
|
|
97
|
+
if self.tags is None and "tags" in self.model_fields_set:
|
|
98
|
+
_dict['tags'] = None
|
|
99
|
+
|
|
100
|
+
return _dict
|
|
101
|
+
|
|
102
|
+
@classmethod
|
|
103
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
104
|
+
"""Create an instance of UpdateDirectiveRequest from a dict"""
|
|
105
|
+
if obj is None:
|
|
106
|
+
return None
|
|
107
|
+
|
|
108
|
+
if not isinstance(obj, dict):
|
|
109
|
+
return cls.model_validate(obj)
|
|
110
|
+
|
|
111
|
+
_obj = cls.model_validate({
|
|
112
|
+
"name": obj.get("name"),
|
|
113
|
+
"content": obj.get("content"),
|
|
114
|
+
"priority": obj.get("priority"),
|
|
115
|
+
"is_active": obj.get("is_active"),
|
|
116
|
+
"tags": obj.get("tags")
|
|
117
|
+
})
|
|
118
|
+
return _obj
|
|
119
|
+
|
|
120
|
+
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from hindsight_client_api.models.mental_model_trigger import MentalModelTrigger
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class UpdateMentalModelRequest(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Request model for updating a mental model.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
name: Optional[StrictStr] = None
|
|
32
|
+
source_query: Optional[StrictStr] = None
|
|
33
|
+
max_tokens: Optional[Annotated[int, Field(le=8192, strict=True, ge=256)]] = None
|
|
34
|
+
tags: Optional[List[StrictStr]] = None
|
|
35
|
+
trigger: Optional[MentalModelTrigger] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["name", "source_query", "max_tokens", "tags", "trigger"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of UpdateMentalModelRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of trigger
|
|
78
|
+
if self.trigger:
|
|
79
|
+
_dict['trigger'] = self.trigger.to_dict()
|
|
80
|
+
# set to None if name (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.name is None and "name" in self.model_fields_set:
|
|
83
|
+
_dict['name'] = None
|
|
84
|
+
|
|
85
|
+
# set to None if source_query (nullable) is None
|
|
86
|
+
# and model_fields_set contains the field
|
|
87
|
+
if self.source_query is None and "source_query" in self.model_fields_set:
|
|
88
|
+
_dict['source_query'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if max_tokens (nullable) is None
|
|
91
|
+
# and model_fields_set contains the field
|
|
92
|
+
if self.max_tokens is None and "max_tokens" in self.model_fields_set:
|
|
93
|
+
_dict['max_tokens'] = None
|
|
94
|
+
|
|
95
|
+
# set to None if tags (nullable) is None
|
|
96
|
+
# and model_fields_set contains the field
|
|
97
|
+
if self.tags is None and "tags" in self.model_fields_set:
|
|
98
|
+
_dict['tags'] = None
|
|
99
|
+
|
|
100
|
+
# set to None if trigger (nullable) is None
|
|
101
|
+
# and model_fields_set contains the field
|
|
102
|
+
if self.trigger is None and "trigger" in self.model_fields_set:
|
|
103
|
+
_dict['trigger'] = None
|
|
104
|
+
|
|
105
|
+
return _dict
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
|
+
"""Create an instance of UpdateMentalModelRequest from a dict"""
|
|
110
|
+
if obj is None:
|
|
111
|
+
return None
|
|
112
|
+
|
|
113
|
+
if not isinstance(obj, dict):
|
|
114
|
+
return cls.model_validate(obj)
|
|
115
|
+
|
|
116
|
+
_obj = cls.model_validate({
|
|
117
|
+
"name": obj.get("name"),
|
|
118
|
+
"source_query": obj.get("source_query"),
|
|
119
|
+
"max_tokens": obj.get("max_tokens"),
|
|
120
|
+
"tags": obj.get("tags"),
|
|
121
|
+
"trigger": MentalModelTrigger.from_dict(obj["trigger"]) if obj.get("trigger") is not None else None
|
|
122
|
+
})
|
|
123
|
+
return _obj
|
|
124
|
+
|
|
125
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from hindsight_client_api.models.features_info import FeaturesInfo
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class VersionResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Response model for the version/info endpoint.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
api_version: StrictStr = Field(description="API version string")
|
|
31
|
+
features: FeaturesInfo = Field(description="Enabled feature flags")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["api_version", "features"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of VersionResponse from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of features
|
|
74
|
+
if self.features:
|
|
75
|
+
_dict['features'] = self.features.to_dict()
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of VersionResponse from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"api_version": obj.get("api_version"),
|
|
89
|
+
"features": FeaturesInfo.from_dict(obj["features"]) if obj.get("features") is not None else None
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
hindsight_client/__init__.py,sha256=PyDJ4UVKmtRN5OeBs0-rl-tUtqS8OoX53qvejKGC3JU,3114
|
|
2
|
-
hindsight_client/hindsight_client.py,sha256=2cgq76d3LTbC51oEos81l80F72-bYOEhR2nJGOL-HCs,16278
|
|
3
|
-
hindsight_client_api/__init__.py,sha256=osB0kfekJX0NrhOPXOmmZH6mw_Q6bASw1PzJlVfIiLI,4768
|
|
4
|
-
hindsight_client_api/api_client.py,sha256=yFIRrXfpV3BoHTh1Xo-ixJVgzz39asRCp9_KDN1-UCs,27537
|
|
5
|
-
hindsight_client_api/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
6
|
-
hindsight_client_api/configuration.py,sha256=ByAYUPBL5JZ753cBbAcS0alWiOH_ZemiAskUXGnaBik,17229
|
|
7
|
-
hindsight_client_api/exceptions.py,sha256=cZAGBnRIB3RWaxddPD7rP_-oHUFfV8QqDKslBBZZows,5899
|
|
8
|
-
hindsight_client_api/rest.py,sha256=bP7YkGFnvF6_fX3e9Vf3XfltJ-qdNPQ9GVne07WUi-Y,7900
|
|
9
|
-
hindsight_client_api/api/__init__.py,sha256=Kn3AGORXpRNUKhh0v-I9-8BoZYGgVxhzIQ1_suO261w,420
|
|
10
|
-
hindsight_client_api/api/banks_api.py,sha256=vT5PayiXZ2gsfeo3xL3KRbBt5xc9YHI4bosWSvjgvts,80232
|
|
11
|
-
hindsight_client_api/api/documents_api.py,sha256=F890v_gYJgbbaqE760jSpTEzT1fVBJ8Lk0Zo-H0ueiQ,46778
|
|
12
|
-
hindsight_client_api/api/entities_api.py,sha256=z9F1s2gA6d8z0cX0w-0QrWJ_pleVEuyIMZUa0h72R0A,35878
|
|
13
|
-
hindsight_client_api/api/memory_api.py,sha256=JJzN3rMhb-Pcu2XhYzWhAXnZ6SRagQMQq9vZ4I0njtU,102710
|
|
14
|
-
hindsight_client_api/api/monitoring_api.py,sha256=pt_jMV8GN6xpxX-iqk-FjrlihXLuygCKCXxg9ksEMcE,19807
|
|
15
|
-
hindsight_client_api/api/operations_api.py,sha256=C-ABeir4C-fz7mbN9_uDGqhVReA9OzsuvC0YYJdWlNo,23249
|
|
16
|
-
hindsight_client_api/models/__init__.py,sha256=ZxwqNlqnlRNv1jdyIWfu-YTK3UR_XWP_6qh2fBtDJ6Q,3798
|
|
17
|
-
hindsight_client_api/models/add_background_request.py,sha256=3rld3CjxNSPbxX9CoDSr5WEuhEoo-gRrCZ709Vvy9rI,2867
|
|
18
|
-
hindsight_client_api/models/background_response.py,sha256=SUFt-k6ipl2SXAvHb3IU3IJ5LuXIGEoK8_pVbZO3Dgw,3144
|
|
19
|
-
hindsight_client_api/models/bank_list_item.py,sha256=grJYCFBinjxEy1M8ZxPiy8asUVKj58b2KnScE2tmU-Q,4137
|
|
20
|
-
hindsight_client_api/models/bank_list_response.py,sha256=LiACkek7iqhA5mmVvYQkMnf4J5bfSFwBJ_mkC0u_Nz4,2896
|
|
21
|
-
hindsight_client_api/models/bank_profile_response.py,sha256=1vMc2814672N61dLK2a8b_H0yJfbOxSgiAQvHztvyrk,3030
|
|
22
|
-
hindsight_client_api/models/bank_stats_response.py,sha256=ekrmI8GnALqfSzOIRXF0a8mXPWyyqzz76SSEl7gfnRE,3521
|
|
23
|
-
hindsight_client_api/models/budget.py,sha256=AwTSqd59PKqQEM1g3qM3E7fSH2lUFll9iFLjzRMhtDE,702
|
|
24
|
-
hindsight_client_api/models/cancel_operation_response.py,sha256=jxLGkFmZ8aWRMcHVmnnnl306u8R10mSS5Yo9n-vtNCM,2656
|
|
25
|
-
hindsight_client_api/models/chunk_data.py,sha256=3iU9LmeMrMr2cdnSoE38_ipx7YZxAHU46v72ShVbPKo,2828
|
|
26
|
-
hindsight_client_api/models/chunk_include_options.py,sha256=96r8h9pZbHGvK2OMC3q4xfoBqXRwCSypmcCDO0KCM7A,2634
|
|
27
|
-
hindsight_client_api/models/chunk_response.py,sha256=5E6XHhhEO7AF_OMNk6vJZFT47_IRex8bGHlFW-AEPLs,2888
|
|
28
|
-
hindsight_client_api/models/create_bank_request.py,sha256=5IEuAmetFFtI1NFH0gTzTCtVni49TNVXAnrqz9n9lhk,3668
|
|
29
|
-
hindsight_client_api/models/delete_document_response.py,sha256=k_gHKh2qiUOyAS-iLzPPGVNFwTltvH2gbFceLU-JBrI,2788
|
|
30
|
-
hindsight_client_api/models/delete_response.py,sha256=8TjUUMXrEfbxxMHj5PsCaqEib2qpaA3JT45cbxToFj0,3126
|
|
31
|
-
hindsight_client_api/models/disposition_traits.py,sha256=I61B7L3BkGQlAxBONDILwE-hH_S3oY2IFrbeTzpj9Mg,3055
|
|
32
|
-
hindsight_client_api/models/document_response.py,sha256=iK_H6V9t02OPBOaEo-U6fczmLNfSNCpeTQDgcziohiM,3416
|
|
33
|
-
hindsight_client_api/models/entity_detail_response.py,sha256=51Pv6lQEVGjUZ2KimRP0xFCowwOgt0ShcNITeHLF0Ro,4312
|
|
34
|
-
hindsight_client_api/models/entity_include_options.py,sha256=j6o0SPWslW7y461xahbw4l1VXMIU1B5vxR3MX8cJ2FY,2635
|
|
35
|
-
hindsight_client_api/models/entity_input.py,sha256=e8d-WuZxv0G_b8BlwASi_Eymwd87-O4Ap2RkaMa3VSU,2760
|
|
36
|
-
hindsight_client_api/models/entity_list_item.py,sha256=ZtdnkJ-xz7djdls1RaYXl7BEF_q1YIcan61MrHH0x6g,3602
|
|
37
|
-
hindsight_client_api/models/entity_list_response.py,sha256=HVjiza5MDMU4RRjVacxnTGOt8Wcue8f41LZmA2-n2q0,3135
|
|
38
|
-
hindsight_client_api/models/entity_observation_response.py,sha256=Sbz_m0MssD-gYyV4sAeD56HGrnmlWcdO0bBs73K65YU,2804
|
|
39
|
-
hindsight_client_api/models/entity_state_response.py,sha256=VNxiaOcNy2vCXuNGJMD1WbTTqwUguizvCxJHkt7Lyuw,3239
|
|
40
|
-
hindsight_client_api/models/graph_data_response.py,sha256=sYmmyxd4lu0FMbN0Ocnj5ShfFWk1GQp2p8i9wZFLLG4,2790
|
|
41
|
-
hindsight_client_api/models/http_validation_error.py,sha256=KKvY67lajAI7hAys0IZHeeTsG2ArvpVIATqSMjbWGOY,2937
|
|
42
|
-
hindsight_client_api/models/include_options.py,sha256=FlB8QT_bqA141_tSv51QvZRbqKZdcaR2estkHg6eBGc,3645
|
|
43
|
-
hindsight_client_api/models/list_documents_response.py,sha256=8lXIfprjJHpWCgiKkw4-M8d2y4NOTcK76HoF1otMekI,2675
|
|
44
|
-
hindsight_client_api/models/list_memory_units_response.py,sha256=gEC-opRav_3cWdKvoO7Hure3dnVyFiFC0gtDP0TE7H8,2684
|
|
45
|
-
hindsight_client_api/models/list_tags_response.py,sha256=VG4PFyNxge1vzeRxq-DwnpgXQmJ9U-MVSpnjiclg-tM,3098
|
|
46
|
-
hindsight_client_api/models/memory_item.py,sha256=MFXBoBDbogNwaWpME5RzUw5PgZLZiA7o3jP0Kw0mJYE,4835
|
|
47
|
-
hindsight_client_api/models/operation_response.py,sha256=ach9QI35J3FtPKLzZDqb54Xfov7ouiEhto4nztCKc8I,3467
|
|
48
|
-
hindsight_client_api/models/operations_list_response.py,sha256=3XOfvTBBkv7VmYo-PZX0wVK_RtMCZkQdaPkXXhGIiRU,3088
|
|
49
|
-
hindsight_client_api/models/recall_request.py,sha256=cGG7rhr5gVnnwagNMAosV9hGJ_vHKlZWHhTCIwbbnNQ,5064
|
|
50
|
-
hindsight_client_api/models/recall_response.py,sha256=t_qYAUMHXFBnXX7kCF8EeLfqeyF9V01wvQizCDvf4dY,5103
|
|
51
|
-
hindsight_client_api/models/recall_result.py,sha256=OULXvXYlxsJYuf8zSsTuV_qArXQFxw2Pw5494FvdGwQ,5689
|
|
52
|
-
hindsight_client_api/models/reflect_fact.py,sha256=sYW00LmDpY7VptK0E4I0gUWHkCRaCTeypuHSdciknw8,3973
|
|
53
|
-
hindsight_client_api/models/reflect_include_options.py,sha256=q3TqMu-zrJw8LIHOl5pb0baDEQlOlFkBI5gE9MEmKQQ,2584
|
|
54
|
-
hindsight_client_api/models/reflect_request.py,sha256=yxAZ0r6fd_rdlISXUXjRz79nwcCEhfVZ9guAe7TfHZc,5018
|
|
55
|
-
hindsight_client_api/models/reflect_response.py,sha256=h8BVIa5j35RNKGHFyB5t9ejZ_iqRJh2eMpaMLQK1PLU,3984
|
|
56
|
-
hindsight_client_api/models/retain_request.py,sha256=xlU_R2qMgbPL00EkRtyFLKIPelyulgleuaIrnJTJiIw,3548
|
|
57
|
-
hindsight_client_api/models/retain_response.py,sha256=RQd_6q1_it0Yfws2BpcuL41FKE1CMnk_65wHcBjtfKw,3721
|
|
58
|
-
hindsight_client_api/models/tag_item.py,sha256=uxTTRBUfSsb8ah3n7DARyStctQZvSfQXcmRdiaJcx_c,2568
|
|
59
|
-
hindsight_client_api/models/token_usage.py,sha256=r8tcfugayce78fZ65LBcTK8HzY8LjnlIbUTHKFKFGUg,3140
|
|
60
|
-
hindsight_client_api/models/update_disposition_request.py,sha256=6D3qceEJByBWcZrfSbNXrdlrDtnj0_QXh2zosc49-5E,2817
|
|
61
|
-
hindsight_client_api/models/validation_error.py,sha256=XnK71WeEUbZyXPbzv1uKaNAFEYxfsiS7G0cvjTgCxiM,3029
|
|
62
|
-
hindsight_client_api/models/validation_error_loc_inner.py,sha256=q51Yi64xsxhsy3_AAD5DlcfI2-g_81hQoN6Olh3I8ag,4812
|
|
63
|
-
hindsight_client-0.3.0.dist-info/METADATA,sha256=_SHV_Xoc3o2FMIy9kv6ptLoFrbyKvCyo4lc3tJAPHNg,647
|
|
64
|
-
hindsight_client-0.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
65
|
-
hindsight_client-0.3.0.dist-info/RECORD,,
|
|
File without changes
|