doc: changelog for 0.2.0 (and regenerate clients) (#99)

* doc: changelog for 0.2.0 (and regenerate clients)

* doc: changelog for 0.2.0 (and regenerate clients)

* doc: changelog for 0.2.0 (and regenerate clients)

* doc: changelog for 0.2.0 (and regenerate clients)

* doc: changelog for 0.2.0 (and regenerate clients)

* doc: changelog for 0.2.0 (and regenerate clients)

* doc: changelog for 0.2.0 (and regenerate clients)

* doc: changelog for 0.2.0 (and regenerate clients)
This commit is contained in:
Nicolò Boschi 2026-01-05 12:36:29 +01:00 committed by GitHub
parent 5e65691743
commit 4f21886a0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 564 additions and 10578 deletions

View file

@ -884,3 +884,75 @@ jobs:
run: |
echo "=== API Server Logs ==="
cat /tmp/api-server.log || echo "No API server log found"
verify-generated-files:
runs-on: ubuntu-latest
env:
UV_INDEX: pytorch=https://download.pytorch.org/whl/cpu
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-gen-${{ hashFiles('**/Cargo.lock') }}
- name: Install Node dependencies
run: npm ci
- name: Install Python dependencies
run: |
cd hindsight-dev && uv sync --index-strategy unsafe-best-match
cd ../hindsight-api && uv sync --index-strategy unsafe-best-match
cd ../hindsight-embed && uv sync --index-strategy unsafe-best-match
- name: Run generate-openapi
run: ./scripts/generate-openapi.sh
- name: Run generate-clients
run: ./scripts/generate-clients.sh
- name: Run lint
run: ./scripts/hooks/lint.sh
- name: Verify no uncommitted changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "❌ Error: Generated files are out of sync with committed files."
echo ""
echo "The following files have changed after running generation scripts:"
git status --porcelain
echo ""
echo "Please run the following commands locally and commit the changes:"
echo " ./scripts/generate-openapi.sh"
echo " ./scripts/generate-clients.sh"
echo " ./scripts/hooks/lint.sh"
echo ""
git diff --stat
exit 1
fi
echo "✓ All generated files are up to date"

View file

@ -161,6 +161,7 @@ pub fn retain(
metadata: None,
timestamp: None,
document_id: Some(doc_id.clone()),
entities: None,
};
let request = RetainRequest {
@ -270,6 +271,7 @@ pub fn retain_files(
metadata: None,
timestamp: None,
document_id: Some(doc_id),
entities: None,
});
pb.inc(1);

View file

@ -9,54 +9,6 @@ hindsight_client_api/api/operations_api.py
hindsight_client_api/api_client.py
hindsight_client_api/api_response.py
hindsight_client_api/configuration.py
hindsight_client_api/docs/AddBackgroundRequest.md
hindsight_client_api/docs/BackgroundResponse.md
hindsight_client_api/docs/BankListItem.md
hindsight_client_api/docs/BankListResponse.md
hindsight_client_api/docs/BankProfileResponse.md
hindsight_client_api/docs/BankStatsResponse.md
hindsight_client_api/docs/BanksApi.md
hindsight_client_api/docs/Budget.md
hindsight_client_api/docs/CancelOperationResponse.md
hindsight_client_api/docs/ChunkData.md
hindsight_client_api/docs/ChunkIncludeOptions.md
hindsight_client_api/docs/ChunkResponse.md
hindsight_client_api/docs/CreateBankRequest.md
hindsight_client_api/docs/DeleteDocumentResponse.md
hindsight_client_api/docs/DeleteResponse.md
hindsight_client_api/docs/DispositionTraits.md
hindsight_client_api/docs/DocumentResponse.md
hindsight_client_api/docs/DocumentsApi.md
hindsight_client_api/docs/EntitiesApi.md
hindsight_client_api/docs/EntityDetailResponse.md
hindsight_client_api/docs/EntityIncludeOptions.md
hindsight_client_api/docs/EntityListItem.md
hindsight_client_api/docs/EntityListResponse.md
hindsight_client_api/docs/EntityObservationResponse.md
hindsight_client_api/docs/EntityStateResponse.md
hindsight_client_api/docs/GraphDataResponse.md
hindsight_client_api/docs/HTTPValidationError.md
hindsight_client_api/docs/IncludeOptions.md
hindsight_client_api/docs/ListDocumentsResponse.md
hindsight_client_api/docs/ListMemoryUnitsResponse.md
hindsight_client_api/docs/MemoryApi.md
hindsight_client_api/docs/MemoryItem.md
hindsight_client_api/docs/MonitoringApi.md
hindsight_client_api/docs/OperationResponse.md
hindsight_client_api/docs/OperationsApi.md
hindsight_client_api/docs/OperationsListResponse.md
hindsight_client_api/docs/RecallRequest.md
hindsight_client_api/docs/RecallResponse.md
hindsight_client_api/docs/RecallResult.md
hindsight_client_api/docs/ReflectFact.md
hindsight_client_api/docs/ReflectIncludeOptions.md
hindsight_client_api/docs/ReflectRequest.md
hindsight_client_api/docs/ReflectResponse.md
hindsight_client_api/docs/RetainRequest.md
hindsight_client_api/docs/RetainResponse.md
hindsight_client_api/docs/UpdateDispositionRequest.md
hindsight_client_api/docs/ValidationError.md
hindsight_client_api/docs/ValidationErrorLocInner.md
hindsight_client_api/exceptions.py
hindsight_client_api/models/__init__.py
hindsight_client_api/models/add_background_request.py
@ -77,6 +29,7 @@ hindsight_client_api/models/disposition_traits.py
hindsight_client_api/models/document_response.py
hindsight_client_api/models/entity_detail_response.py
hindsight_client_api/models/entity_include_options.py
hindsight_client_api/models/entity_input.py
hindsight_client_api/models/entity_list_item.py
hindsight_client_api/models/entity_list_response.py
hindsight_client_api/models/entity_observation_response.py

View file

@ -1 +1 @@
7.18.0-SNAPSHOT
7.10.0

View file

@ -16,127 +16,66 @@
__version__ = "0.0.7"
# Define package exports
__all__ = [
"BanksApi",
"DocumentsApi",
"EntitiesApi",
"MemoryApi",
"MonitoringApi",
"OperationsApi",
"ApiResponse",
"ApiClient",
"Configuration",
"OpenApiException",
"ApiTypeError",
"ApiValueError",
"ApiKeyError",
"ApiAttributeError",
"ApiException",
"AddBackgroundRequest",
"BackgroundResponse",
"BankListItem",
"BankListResponse",
"BankProfileResponse",
"BankStatsResponse",
"Budget",
"CancelOperationResponse",
"ChunkData",
"ChunkIncludeOptions",
"ChunkResponse",
"CreateBankRequest",
"DeleteDocumentResponse",
"DeleteResponse",
"DispositionTraits",
"DocumentResponse",
"EntityDetailResponse",
"EntityIncludeOptions",
"EntityListItem",
"EntityListResponse",
"EntityObservationResponse",
"EntityStateResponse",
"GraphDataResponse",
"HTTPValidationError",
"IncludeOptions",
"ListDocumentsResponse",
"ListMemoryUnitsResponse",
"MemoryItem",
"OperationResponse",
"OperationsListResponse",
"RecallRequest",
"RecallResponse",
"RecallResult",
"ReflectFact",
"ReflectIncludeOptions",
"ReflectRequest",
"ReflectResponse",
"RetainRequest",
"RetainResponse",
"UpdateDispositionRequest",
"ValidationError",
"ValidationErrorLocInner",
]
# import apis into sdk package
from hindsight_client_api.api.banks_api import BanksApi as BanksApi
from hindsight_client_api.api.documents_api import DocumentsApi as DocumentsApi
from hindsight_client_api.api.entities_api import EntitiesApi as EntitiesApi
from hindsight_client_api.api.memory_api import MemoryApi as MemoryApi
from hindsight_client_api.api.monitoring_api import MonitoringApi as MonitoringApi
from hindsight_client_api.api.operations_api import OperationsApi as OperationsApi
from hindsight_client_api.api.banks_api import BanksApi
from hindsight_client_api.api.documents_api import DocumentsApi
from hindsight_client_api.api.entities_api import EntitiesApi
from hindsight_client_api.api.memory_api import MemoryApi
from hindsight_client_api.api.monitoring_api import MonitoringApi
from hindsight_client_api.api.operations_api import OperationsApi
# import ApiClient
from hindsight_client_api.api_response import ApiResponse as ApiResponse
from hindsight_client_api.api_client import ApiClient as ApiClient
from hindsight_client_api.configuration import Configuration as Configuration
from hindsight_client_api.exceptions import OpenApiException as OpenApiException
from hindsight_client_api.exceptions import ApiTypeError as ApiTypeError
from hindsight_client_api.exceptions import ApiValueError as ApiValueError
from hindsight_client_api.exceptions import ApiKeyError as ApiKeyError
from hindsight_client_api.exceptions import ApiAttributeError as ApiAttributeError
from hindsight_client_api.exceptions import ApiException as ApiException
from hindsight_client_api.api_response import ApiResponse
from hindsight_client_api.api_client import ApiClient
from hindsight_client_api.configuration import Configuration
from hindsight_client_api.exceptions import OpenApiException
from hindsight_client_api.exceptions import ApiTypeError
from hindsight_client_api.exceptions import ApiValueError
from hindsight_client_api.exceptions import ApiKeyError
from hindsight_client_api.exceptions import ApiAttributeError
from hindsight_client_api.exceptions import ApiException
# import models into sdk package
from hindsight_client_api.models.add_background_request import AddBackgroundRequest as AddBackgroundRequest
from hindsight_client_api.models.background_response import BackgroundResponse as BackgroundResponse
from hindsight_client_api.models.bank_list_item import BankListItem as BankListItem
from hindsight_client_api.models.bank_list_response import BankListResponse as BankListResponse
from hindsight_client_api.models.bank_profile_response import BankProfileResponse as BankProfileResponse
from hindsight_client_api.models.bank_stats_response import BankStatsResponse as BankStatsResponse
from hindsight_client_api.models.budget import Budget as Budget
from hindsight_client_api.models.cancel_operation_response import CancelOperationResponse as CancelOperationResponse
from hindsight_client_api.models.chunk_data import ChunkData as ChunkData
from hindsight_client_api.models.chunk_include_options import ChunkIncludeOptions as ChunkIncludeOptions
from hindsight_client_api.models.chunk_response import ChunkResponse as ChunkResponse
from hindsight_client_api.models.create_bank_request import CreateBankRequest as CreateBankRequest
from hindsight_client_api.models.delete_document_response import DeleteDocumentResponse as DeleteDocumentResponse
from hindsight_client_api.models.delete_response import DeleteResponse as DeleteResponse
from hindsight_client_api.models.disposition_traits import DispositionTraits as DispositionTraits
from hindsight_client_api.models.document_response import DocumentResponse as DocumentResponse
from hindsight_client_api.models.entity_detail_response import EntityDetailResponse as EntityDetailResponse
from hindsight_client_api.models.entity_include_options import EntityIncludeOptions as EntityIncludeOptions
from hindsight_client_api.models.entity_list_item import EntityListItem as EntityListItem
from hindsight_client_api.models.entity_list_response import EntityListResponse as EntityListResponse
from hindsight_client_api.models.entity_observation_response import EntityObservationResponse as EntityObservationResponse
from hindsight_client_api.models.entity_state_response import EntityStateResponse as EntityStateResponse
from hindsight_client_api.models.graph_data_response import GraphDataResponse as GraphDataResponse
from hindsight_client_api.models.http_validation_error import HTTPValidationError as HTTPValidationError
from hindsight_client_api.models.include_options import IncludeOptions as IncludeOptions
from hindsight_client_api.models.list_documents_response import ListDocumentsResponse as ListDocumentsResponse
from hindsight_client_api.models.list_memory_units_response import ListMemoryUnitsResponse as ListMemoryUnitsResponse
from hindsight_client_api.models.memory_item import MemoryItem as MemoryItem
from hindsight_client_api.models.operation_response import OperationResponse as OperationResponse
from hindsight_client_api.models.operations_list_response import OperationsListResponse as OperationsListResponse
from hindsight_client_api.models.recall_request import RecallRequest as RecallRequest
from hindsight_client_api.models.recall_response import RecallResponse as RecallResponse
from hindsight_client_api.models.recall_result import RecallResult as RecallResult
from hindsight_client_api.models.reflect_fact import ReflectFact as ReflectFact
from hindsight_client_api.models.reflect_include_options import ReflectIncludeOptions as ReflectIncludeOptions
from hindsight_client_api.models.reflect_request import ReflectRequest as ReflectRequest
from hindsight_client_api.models.reflect_response import ReflectResponse as ReflectResponse
from hindsight_client_api.models.retain_request import RetainRequest as RetainRequest
from hindsight_client_api.models.retain_response import RetainResponse as RetainResponse
from hindsight_client_api.models.update_disposition_request import UpdateDispositionRequest as UpdateDispositionRequest
from hindsight_client_api.models.validation_error import ValidationError as ValidationError
from hindsight_client_api.models.validation_error_loc_inner import ValidationErrorLocInner as ValidationErrorLocInner
from hindsight_client_api.models.add_background_request import AddBackgroundRequest
from hindsight_client_api.models.background_response import BackgroundResponse
from hindsight_client_api.models.bank_list_item import BankListItem
from hindsight_client_api.models.bank_list_response import BankListResponse
from hindsight_client_api.models.bank_profile_response import BankProfileResponse
from hindsight_client_api.models.bank_stats_response import BankStatsResponse
from hindsight_client_api.models.budget import Budget
from hindsight_client_api.models.cancel_operation_response import CancelOperationResponse
from hindsight_client_api.models.chunk_data import ChunkData
from hindsight_client_api.models.chunk_include_options import ChunkIncludeOptions
from hindsight_client_api.models.chunk_response import ChunkResponse
from hindsight_client_api.models.create_bank_request import CreateBankRequest
from hindsight_client_api.models.delete_document_response import DeleteDocumentResponse
from hindsight_client_api.models.delete_response import DeleteResponse
from hindsight_client_api.models.disposition_traits import DispositionTraits
from hindsight_client_api.models.document_response import DocumentResponse
from hindsight_client_api.models.entity_detail_response import EntityDetailResponse
from hindsight_client_api.models.entity_include_options import EntityIncludeOptions
from hindsight_client_api.models.entity_input import EntityInput
from hindsight_client_api.models.entity_list_item import EntityListItem
from hindsight_client_api.models.entity_list_response import EntityListResponse
from hindsight_client_api.models.entity_observation_response import EntityObservationResponse
from hindsight_client_api.models.entity_state_response import EntityStateResponse
from hindsight_client_api.models.graph_data_response import GraphDataResponse
from hindsight_client_api.models.http_validation_error import HTTPValidationError
from hindsight_client_api.models.include_options import IncludeOptions
from hindsight_client_api.models.list_documents_response import ListDocumentsResponse
from hindsight_client_api.models.list_memory_units_response import ListMemoryUnitsResponse
from hindsight_client_api.models.memory_item import MemoryItem
from hindsight_client_api.models.operation_response import OperationResponse
from hindsight_client_api.models.operations_list_response import OperationsListResponse
from hindsight_client_api.models.recall_request import RecallRequest
from hindsight_client_api.models.recall_response import RecallResponse
from hindsight_client_api.models.recall_result import RecallResult
from hindsight_client_api.models.reflect_fact import ReflectFact
from hindsight_client_api.models.reflect_include_options import ReflectIncludeOptions
from hindsight_client_api.models.reflect_request import ReflectRequest
from hindsight_client_api.models.reflect_response import ReflectResponse
from hindsight_client_api.models.retain_request import RetainRequest
from hindsight_client_api.models.retain_response import RetainResponse
from hindsight_client_api.models.update_disposition_request import UpdateDispositionRequest
from hindsight_client_api.models.validation_error import ValidationError
from hindsight_client_api.models.validation_error_loc_inner import ValidationErrorLocInner

View file

@ -21,7 +21,6 @@ import mimetypes
import os
import re
import tempfile
import uuid
from urllib.parse import quote
from typing import Tuple, Optional, List, Dict, Union
@ -360,8 +359,6 @@ class ApiClient:
return obj.get_secret_value()
elif isinstance(obj, self.PRIMITIVE_TYPES):
return obj
elif isinstance(obj, uuid.UUID):
return str(obj)
elif isinstance(obj, list):
return [
self.sanitize_for_serialization(sub_obj) for sub_obj in obj
@ -388,10 +385,6 @@ class ApiClient:
else:
obj_dict = obj.__dict__
if isinstance(obj_dict, list):
# here we handle instances that can either be a list or something else, and only became a real list by calling to_dict()
return self.sanitize_for_serialization(obj_dict)
return {
key: self.sanitize_for_serialization(val)
for key, val in obj_dict.items()
@ -414,7 +407,7 @@ class ApiClient:
data = json.loads(response_text)
except ValueError:
data = response_text
elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
if response_text == "":
data = ""
else:
@ -463,13 +456,13 @@ class ApiClient:
if klass in self.PRIMITIVE_TYPES:
return self.__deserialize_primitive(data, klass)
elif klass is object:
elif klass == object:
return self.__deserialize_object(data)
elif klass is datetime.date:
elif klass == datetime.date:
return self.__deserialize_date(data)
elif klass is datetime.datetime:
elif klass == datetime.datetime:
return self.__deserialize_datetime(data)
elif klass is decimal.Decimal:
elif klass == decimal.Decimal:
return decimal.Decimal(data)
elif issubclass(klass, Enum):
return self.__deserialize_enum(data, klass)
@ -527,7 +520,7 @@ class ApiClient:
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
new_params.extend((k, quote(str(value))) for value in v)
new_params.extend((k, str(value)) for value in v)
else:
if collection_format == 'ssv':
delimiter = ' '

View file

@ -17,7 +17,7 @@ import http.client as httplib
import logging
from logging import FileHandler
import sys
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
from typing_extensions import NotRequired, Self
import urllib3
@ -159,10 +159,6 @@ class Configuration:
: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.
:param ca_cert_data: verify the peer using concatenated CA certificate data
in PEM (str) or DER (bytes) format.
:param cert_file: the path to a client certificate file, for mTLS.
:param key_file: the path to a client key file, for mTLS.
"""
@ -183,9 +179,6 @@ class Configuration:
ignore_operation_servers: bool=False,
ssl_ca_cert: Optional[str]=None,
retries: Optional[int] = None,
ca_cert_data: Optional[Union[str, bytes]] = None,
cert_file: Optional[str]=None,
key_file: Optional[str]=None,
*,
debug: Optional[bool] = None,
) -> None:
@ -263,14 +256,10 @@ class Configuration:
self.ssl_ca_cert = ssl_ca_cert
"""Set this to customize the certificate file to verify the peer.
"""
self.ca_cert_data = ca_cert_data
"""Set this to verify the peer using PEM (str) or DER (bytes)
certificate data.
"""
self.cert_file = cert_file
self.cert_file = None
"""client certificate file
"""
self.key_file = key_file
self.key_file = None
"""client key file
"""
self.assert_hostname = None

View file

@ -1,31 +0,0 @@
# AddBackgroundRequest
Request model for adding/merging background information.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | **str** | New background information to add or merge |
**update_disposition** | **bool** | If true, infer disposition traits from the merged background (default: true) | [optional] [default to True]
## Example
```python
from hindsight_client_api.models.add_background_request import AddBackgroundRequest
# TODO update the JSON string below
json = "{}"
# create an instance of AddBackgroundRequest from a JSON string
add_background_request_instance = AddBackgroundRequest.from_json(json)
# print the JSON string representation of the object
print(AddBackgroundRequest.to_json())
# convert the object into a dict
add_background_request_dict = add_background_request_instance.to_dict()
# create an instance of AddBackgroundRequest from a dict
add_background_request_from_dict = AddBackgroundRequest.from_dict(add_background_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)

View file

@ -1,31 +0,0 @@
# BackgroundResponse
Response model for background update.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**background** | **str** | |
**disposition** | [**DispositionTraits**](DispositionTraits.md) | | [optional]
## Example
```python
from hindsight_client_api.models.background_response import BackgroundResponse
# TODO update the JSON string below
json = "{}"
# create an instance of BackgroundResponse from a JSON string
background_response_instance = BackgroundResponse.from_json(json)
# print the JSON string representation of the object
print(BackgroundResponse.to_json())
# convert the object into a dict
background_response_dict = background_response_instance.to_dict()
# create an instance of BackgroundResponse from a dict
background_response_from_dict = BackgroundResponse.from_dict(background_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)

View file

@ -1,35 +0,0 @@
# BankListItem
Bank list item with profile summary.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bank_id** | **str** | |
**name** | **str** | | [optional]
**disposition** | [**DispositionTraits**](DispositionTraits.md) | |
**background** | **str** | | [optional]
**created_at** | **str** | | [optional]
**updated_at** | **str** | | [optional]
## Example
```python
from hindsight_client_api.models.bank_list_item import BankListItem
# TODO update the JSON string below
json = "{}"
# create an instance of BankListItem from a JSON string
bank_list_item_instance = BankListItem.from_json(json)
# print the JSON string representation of the object
print(BankListItem.to_json())
# convert the object into a dict
bank_list_item_dict = bank_list_item_instance.to_dict()
# create an instance of BankListItem from a dict
bank_list_item_from_dict = BankListItem.from_dict(bank_list_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)

View file

@ -1,30 +0,0 @@
# BankListResponse
Response model for listing all banks.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**banks** | [**List[BankListItem]**](BankListItem.md) | |
## Example
```python
from hindsight_client_api.models.bank_list_response import BankListResponse
# TODO update the JSON string below
json = "{}"
# create an instance of BankListResponse from a JSON string
bank_list_response_instance = BankListResponse.from_json(json)
# print the JSON string representation of the object
print(BankListResponse.to_json())
# convert the object into a dict
bank_list_response_dict = bank_list_response_instance.to_dict()
# create an instance of BankListResponse from a dict
bank_list_response_from_dict = BankListResponse.from_dict(bank_list_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)

View file

@ -1,33 +0,0 @@
# BankProfileResponse
Response model for bank profile.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bank_id** | **str** | |
**name** | **str** | |
**disposition** | [**DispositionTraits**](DispositionTraits.md) | |
**background** | **str** | |
## Example
```python
from hindsight_client_api.models.bank_profile_response import BankProfileResponse
# TODO update the JSON string below
json = "{}"
# create an instance of BankProfileResponse from a JSON string
bank_profile_response_instance = BankProfileResponse.from_json(json)
# print the JSON string representation of the object
print(BankProfileResponse.to_json())
# convert the object into a dict
bank_profile_response_dict = bank_profile_response_instance.to_dict()
# create an instance of BankProfileResponse from a dict
bank_profile_response_from_dict = BankProfileResponse.from_dict(bank_profile_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)

View file

@ -1,39 +0,0 @@
# BankStatsResponse
Response model for bank statistics endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bank_id** | **str** | |
**total_nodes** | **int** | |
**total_links** | **int** | |
**total_documents** | **int** | |
**nodes_by_fact_type** | **Dict[str, int]** | |
**links_by_link_type** | **Dict[str, int]** | |
**links_by_fact_type** | **Dict[str, int]** | |
**links_breakdown** | **Dict[str, Dict[str, int]]** | |
**pending_operations** | **int** | |
**failed_operations** | **int** | |
## Example
```python
from hindsight_client_api.models.bank_stats_response import BankStatsResponse
# TODO update the JSON string below
json = "{}"
# create an instance of BankStatsResponse from a JSON string
bank_stats_response_instance = BankStatsResponse.from_json(json)
# print the JSON string representation of the object
print(BankStatsResponse.to_json())
# convert the object into a dict
bank_stats_response_dict = bank_stats_response_instance.to_dict()
# create an instance of BankStatsResponse from a dict
bank_stats_response_from_dict = BankStatsResponse.from_dict(bank_stats_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)

View file

@ -1,517 +0,0 @@
# hindsight_client_api.BanksApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_bank_background**](BanksApi.md#add_bank_background) | **POST** /v1/default/banks/{bank_id}/background | Add/merge memory bank background
[**create_or_update_bank**](BanksApi.md#create_or_update_bank) | **PUT** /v1/default/banks/{bank_id} | Create or update memory bank
[**delete_bank**](BanksApi.md#delete_bank) | **DELETE** /v1/default/banks/{bank_id} | Delete memory bank
[**get_agent_stats**](BanksApi.md#get_agent_stats) | **GET** /v1/default/banks/{bank_id}/stats | Get statistics for memory bank
[**get_bank_profile**](BanksApi.md#get_bank_profile) | **GET** /v1/default/banks/{bank_id}/profile | Get memory bank profile
[**list_banks**](BanksApi.md#list_banks) | **GET** /v1/default/banks | List all memory banks
[**update_bank_disposition**](BanksApi.md#update_bank_disposition) | **PUT** /v1/default/banks/{bank_id}/profile | Update memory bank disposition
# **add_bank_background**
> BackgroundResponse add_bank_background(bank_id, add_background_request, authorization=authorization)
Add/merge memory bank background
Add new background information or merge with existing. LLM intelligently resolves conflicts, normalizes to first person, and optionally infers disposition traits.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.add_background_request import AddBackgroundRequest
from hindsight_client_api.models.background_response import BackgroundResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.BanksApi(api_client)
bank_id = 'bank_id_example' # str |
add_background_request = hindsight_client_api.AddBackgroundRequest() # AddBackgroundRequest |
authorization = 'authorization_example' # str | (optional)
try:
# Add/merge memory bank background
api_response = await api_instance.add_bank_background(bank_id, add_background_request, authorization=authorization)
print("The response of BanksApi->add_bank_background:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BanksApi->add_bank_background: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**add_background_request** | [**AddBackgroundRequest**](AddBackgroundRequest.md)| |
**authorization** | **str**| | [optional]
### Return type
[**BackgroundResponse**](BackgroundResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **create_or_update_bank**
> BankProfileResponse create_or_update_bank(bank_id, create_bank_request, authorization=authorization)
Create or update memory bank
Create a new agent or update existing agent with disposition and background. Auto-fills missing fields with defaults.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.bank_profile_response import BankProfileResponse
from hindsight_client_api.models.create_bank_request import CreateBankRequest
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.BanksApi(api_client)
bank_id = 'bank_id_example' # str |
create_bank_request = hindsight_client_api.CreateBankRequest() # CreateBankRequest |
authorization = 'authorization_example' # str | (optional)
try:
# Create or update memory bank
api_response = await api_instance.create_or_update_bank(bank_id, create_bank_request, authorization=authorization)
print("The response of BanksApi->create_or_update_bank:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BanksApi->create_or_update_bank: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**create_bank_request** | [**CreateBankRequest**](CreateBankRequest.md)| |
**authorization** | **str**| | [optional]
### Return type
[**BankProfileResponse**](BankProfileResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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_bank**
> DeleteResponse delete_bank(bank_id, authorization=authorization)
Delete memory bank
Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.delete_response import DeleteResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.BanksApi(api_client)
bank_id = 'bank_id_example' # str |
authorization = 'authorization_example' # str | (optional)
try:
# Delete memory bank
api_response = await api_instance.delete_bank(bank_id, authorization=authorization)
print("The response of BanksApi->delete_bank:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BanksApi->delete_bank: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**authorization** | **str**| | [optional]
### Return type
[**DeleteResponse**](DeleteResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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_agent_stats**
> BankStatsResponse get_agent_stats(bank_id)
Get statistics for memory bank
Get statistics about nodes and links for a specific agent
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.bank_stats_response import BankStatsResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.BanksApi(api_client)
bank_id = 'bank_id_example' # str |
try:
# Get statistics for memory bank
api_response = await api_instance.get_agent_stats(bank_id)
print("The response of BanksApi->get_agent_stats:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BanksApi->get_agent_stats: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
### Return type
[**BankStatsResponse**](BankStatsResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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_bank_profile**
> BankProfileResponse get_bank_profile(bank_id, authorization=authorization)
Get memory bank profile
Get disposition traits and background for a memory bank. Auto-creates agent with defaults if not exists.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.bank_profile_response import BankProfileResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.BanksApi(api_client)
bank_id = 'bank_id_example' # str |
authorization = 'authorization_example' # str | (optional)
try:
# Get memory bank profile
api_response = await api_instance.get_bank_profile(bank_id, authorization=authorization)
print("The response of BanksApi->get_bank_profile:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BanksApi->get_bank_profile: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**authorization** | **str**| | [optional]
### Return type
[**BankProfileResponse**](BankProfileResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **list_banks**
> BankListResponse list_banks(authorization=authorization)
List all memory banks
Get a list of all agents with their profiles
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.bank_list_response import BankListResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.BanksApi(api_client)
authorization = 'authorization_example' # str | (optional)
try:
# List all memory banks
api_response = await api_instance.list_banks(authorization=authorization)
print("The response of BanksApi->list_banks:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BanksApi->list_banks: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**authorization** | **str**| | [optional]
### Return type
[**BankListResponse**](BankListResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **update_bank_disposition**
> BankProfileResponse update_bank_disposition(bank_id, update_disposition_request, authorization=authorization)
Update memory bank disposition
Update bank's disposition traits (skepticism, literalism, empathy)
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.bank_profile_response import BankProfileResponse
from hindsight_client_api.models.update_disposition_request import UpdateDispositionRequest
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.BanksApi(api_client)
bank_id = 'bank_id_example' # str |
update_disposition_request = hindsight_client_api.UpdateDispositionRequest() # UpdateDispositionRequest |
authorization = 'authorization_example' # str | (optional)
try:
# Update memory bank disposition
api_response = await api_instance.update_bank_disposition(bank_id, update_disposition_request, authorization=authorization)
print("The response of BanksApi->update_bank_disposition:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BanksApi->update_bank_disposition: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**update_disposition_request** | [**UpdateDispositionRequest**](UpdateDispositionRequest.md)| |
**authorization** | **str**| | [optional]
### Return type
[**BankProfileResponse**](BankProfileResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)

View file

@ -1,15 +0,0 @@
# Budget
Budget levels for recall/reflect operations.
## Enum
* `LOW` (value: `'low'`)
* `MID` (value: `'mid'`)
* `HIGH` (value: `'high'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -1,32 +0,0 @@
# CancelOperationResponse
Response model for cancel operation endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**success** | **bool** | |
**message** | **str** | |
**operation_id** | **str** | |
## Example
```python
from hindsight_client_api.models.cancel_operation_response import CancelOperationResponse
# TODO update the JSON string below
json = "{}"
# create an instance of CancelOperationResponse from a JSON string
cancel_operation_response_instance = CancelOperationResponse.from_json(json)
# print the JSON string representation of the object
print(CancelOperationResponse.to_json())
# convert the object into a dict
cancel_operation_response_dict = cancel_operation_response_instance.to_dict()
# create an instance of CancelOperationResponse from a dict
cancel_operation_response_from_dict = CancelOperationResponse.from_dict(cancel_operation_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)

View file

@ -1,33 +0,0 @@
# ChunkData
Chunk data for a single chunk.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
**text** | **str** | |
**chunk_index** | **int** | |
**truncated** | **bool** | Whether the chunk text was truncated due to token limits | [optional] [default to False]
## Example
```python
from hindsight_client_api.models.chunk_data import ChunkData
# TODO update the JSON string below
json = "{}"
# create an instance of ChunkData from a JSON string
chunk_data_instance = ChunkData.from_json(json)
# print the JSON string representation of the object
print(ChunkData.to_json())
# convert the object into a dict
chunk_data_dict = chunk_data_instance.to_dict()
# create an instance of ChunkData from a dict
chunk_data_from_dict = ChunkData.from_dict(chunk_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)

View file

@ -1,30 +0,0 @@
# ChunkIncludeOptions
Options for including chunks in recall results.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**max_tokens** | **int** | Maximum tokens for chunks (chunks may be truncated) | [optional] [default to 8192]
## Example
```python
from hindsight_client_api.models.chunk_include_options import ChunkIncludeOptions
# TODO update the JSON string below
json = "{}"
# create an instance of ChunkIncludeOptions from a JSON string
chunk_include_options_instance = ChunkIncludeOptions.from_json(json)
# print the JSON string representation of the object
print(ChunkIncludeOptions.to_json())
# convert the object into a dict
chunk_include_options_dict = chunk_include_options_instance.to_dict()
# create an instance of ChunkIncludeOptions from a dict
chunk_include_options_from_dict = ChunkIncludeOptions.from_dict(chunk_include_options_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)

View file

@ -1,35 +0,0 @@
# ChunkResponse
Response model for get chunk endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**chunk_id** | **str** | |
**document_id** | **str** | |
**bank_id** | **str** | |
**chunk_index** | **int** | |
**chunk_text** | **str** | |
**created_at** | **str** | |
## Example
```python
from hindsight_client_api.models.chunk_response import ChunkResponse
# TODO update the JSON string below
json = "{}"
# create an instance of ChunkResponse from a JSON string
chunk_response_instance = ChunkResponse.from_json(json)
# print the JSON string representation of the object
print(ChunkResponse.to_json())
# convert the object into a dict
chunk_response_dict = chunk_response_instance.to_dict()
# create an instance of ChunkResponse from a dict
chunk_response_from_dict = ChunkResponse.from_dict(chunk_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)

View file

@ -1,32 +0,0 @@
# CreateBankRequest
Request model for creating/updating a bank.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**disposition** | [**DispositionTraits**](DispositionTraits.md) | | [optional]
**background** | **str** | | [optional]
## Example
```python
from hindsight_client_api.models.create_bank_request import CreateBankRequest
# TODO update the JSON string below
json = "{}"
# create an instance of CreateBankRequest from a JSON string
create_bank_request_instance = CreateBankRequest.from_json(json)
# print the JSON string representation of the object
print(CreateBankRequest.to_json())
# convert the object into a dict
create_bank_request_dict = create_bank_request_instance.to_dict()
# create an instance of CreateBankRequest from a dict
create_bank_request_from_dict = CreateBankRequest.from_dict(create_bank_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)

View file

@ -1,33 +0,0 @@
# DeleteDocumentResponse
Response model for delete document endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**success** | **bool** | |
**message** | **str** | |
**document_id** | **str** | |
**memory_units_deleted** | **int** | |
## Example
```python
from hindsight_client_api.models.delete_document_response import DeleteDocumentResponse
# TODO update the JSON string below
json = "{}"
# create an instance of DeleteDocumentResponse from a JSON string
delete_document_response_instance = DeleteDocumentResponse.from_json(json)
# print the JSON string representation of the object
print(DeleteDocumentResponse.to_json())
# convert the object into a dict
delete_document_response_dict = delete_document_response_instance.to_dict()
# create an instance of DeleteDocumentResponse from a dict
delete_document_response_from_dict = DeleteDocumentResponse.from_dict(delete_document_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)

View file

@ -1,32 +0,0 @@
# DeleteResponse
Response model for delete operations.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**success** | **bool** | |
**message** | **str** | | [optional]
**deleted_count** | **int** | | [optional]
## Example
```python
from hindsight_client_api.models.delete_response import DeleteResponse
# TODO update the JSON string below
json = "{}"
# create an instance of DeleteResponse from a JSON string
delete_response_instance = DeleteResponse.from_json(json)
# print the JSON string representation of the object
print(DeleteResponse.to_json())
# convert the object into a dict
delete_response_dict = delete_response_instance.to_dict()
# create an instance of DeleteResponse from a dict
delete_response_from_dict = DeleteResponse.from_dict(delete_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)

View file

@ -1,32 +0,0 @@
# DispositionTraits
Disposition traits that influence how memories are formed and interpreted.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**skepticism** | **int** | How skeptical vs trusting (1=trusting, 5=skeptical) |
**literalism** | **int** | How literally to interpret information (1=flexible, 5=literal) |
**empathy** | **int** | How much to consider emotional context (1=detached, 5=empathetic) |
## Example
```python
from hindsight_client_api.models.disposition_traits import DispositionTraits
# TODO update the JSON string below
json = "{}"
# create an instance of DispositionTraits from a JSON string
disposition_traits_instance = DispositionTraits.from_json(json)
# print the JSON string representation of the object
print(DispositionTraits.to_json())
# convert the object into a dict
disposition_traits_dict = disposition_traits_instance.to_dict()
# create an instance of DispositionTraits from a dict
disposition_traits_from_dict = DispositionTraits.from_dict(disposition_traits_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)

View file

@ -1,36 +0,0 @@
# DocumentResponse
Response model for get document endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
**bank_id** | **str** | |
**original_text** | **str** | |
**content_hash** | **str** | |
**created_at** | **str** | |
**updated_at** | **str** | |
**memory_unit_count** | **int** | |
## Example
```python
from hindsight_client_api.models.document_response import DocumentResponse
# TODO update the JSON string below
json = "{}"
# create an instance of DocumentResponse from a JSON string
document_response_instance = DocumentResponse.from_json(json)
# print the JSON string representation of the object
print(DocumentResponse.to_json())
# convert the object into a dict
document_response_dict = document_response_instance.to_dict()
# create an instance of DocumentResponse from a dict
document_response_from_dict = DocumentResponse.from_dict(document_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)

View file

@ -1,313 +0,0 @@
# hindsight_client_api.DocumentsApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_document**](DocumentsApi.md#delete_document) | **DELETE** /v1/default/banks/{bank_id}/documents/{document_id} | Delete a document
[**get_chunk**](DocumentsApi.md#get_chunk) | **GET** /v1/default/chunks/{chunk_id} | Get chunk details
[**get_document**](DocumentsApi.md#get_document) | **GET** /v1/default/banks/{bank_id}/documents/{document_id} | Get document details
[**list_documents**](DocumentsApi.md#list_documents) | **GET** /v1/default/banks/{bank_id}/documents | List documents
# **delete_document**
> DeleteDocumentResponse delete_document(bank_id, document_id, authorization=authorization)
Delete a document
Delete a document and all its associated memory units and links.
This will cascade delete:
- The document itself
- All memory units extracted from this document
- All links (temporal, semantic, entity) associated with those memory units
This operation cannot be undone.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.delete_document_response import DeleteDocumentResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.DocumentsApi(api_client)
bank_id = 'bank_id_example' # str |
document_id = 'document_id_example' # str |
authorization = 'authorization_example' # str | (optional)
try:
# Delete a document
api_response = await api_instance.delete_document(bank_id, document_id, authorization=authorization)
print("The response of DocumentsApi->delete_document:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DocumentsApi->delete_document: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**document_id** | **str**| |
**authorization** | **str**| | [optional]
### Return type
[**DeleteDocumentResponse**](DeleteDocumentResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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_chunk**
> ChunkResponse get_chunk(chunk_id, authorization=authorization)
Get chunk details
Get a specific chunk by its ID
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.chunk_response import ChunkResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.DocumentsApi(api_client)
chunk_id = 'chunk_id_example' # str |
authorization = 'authorization_example' # str | (optional)
try:
# Get chunk details
api_response = await api_instance.get_chunk(chunk_id, authorization=authorization)
print("The response of DocumentsApi->get_chunk:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DocumentsApi->get_chunk: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**chunk_id** | **str**| |
**authorization** | **str**| | [optional]
### Return type
[**ChunkResponse**](ChunkResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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_document**
> DocumentResponse get_document(bank_id, document_id, authorization=authorization)
Get document details
Get a specific document including its original text
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.document_response import DocumentResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.DocumentsApi(api_client)
bank_id = 'bank_id_example' # str |
document_id = 'document_id_example' # str |
authorization = 'authorization_example' # str | (optional)
try:
# Get document details
api_response = await api_instance.get_document(bank_id, document_id, authorization=authorization)
print("The response of DocumentsApi->get_document:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DocumentsApi->get_document: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**document_id** | **str**| |
**authorization** | **str**| | [optional]
### Return type
[**DocumentResponse**](DocumentResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **list_documents**
> ListDocumentsResponse list_documents(bank_id, q=q, limit=limit, offset=offset, authorization=authorization)
List documents
List documents with pagination and optional search. Documents are the source content from which memory units are extracted.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.list_documents_response import ListDocumentsResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.DocumentsApi(api_client)
bank_id = 'bank_id_example' # str |
q = 'q_example' # str | (optional)
limit = 100 # int | (optional) (default to 100)
offset = 0 # int | (optional) (default to 0)
authorization = 'authorization_example' # str | (optional)
try:
# List documents
api_response = await api_instance.list_documents(bank_id, q=q, limit=limit, offset=offset, authorization=authorization)
print("The response of DocumentsApi->list_documents:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DocumentsApi->list_documents: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**q** | **str**| | [optional]
**limit** | **int**| | [optional] [default to 100]
**offset** | **int**| | [optional] [default to 0]
**authorization** | **str**| | [optional]
### Return type
[**ListDocumentsResponse**](ListDocumentsResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)

View file

@ -1,230 +0,0 @@
# hindsight_client_api.EntitiesApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_entity**](EntitiesApi.md#get_entity) | **GET** /v1/default/banks/{bank_id}/entities/{entity_id} | Get entity details
[**list_entities**](EntitiesApi.md#list_entities) | **GET** /v1/default/banks/{bank_id}/entities | List entities
[**regenerate_entity_observations**](EntitiesApi.md#regenerate_entity_observations) | **POST** /v1/default/banks/{bank_id}/entities/{entity_id}/regenerate | Regenerate entity observations
# **get_entity**
> EntityDetailResponse get_entity(bank_id, entity_id, authorization=authorization)
Get entity details
Get detailed information about an entity including observations (mental model).
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.entity_detail_response import EntityDetailResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.EntitiesApi(api_client)
bank_id = 'bank_id_example' # str |
entity_id = 'entity_id_example' # str |
authorization = 'authorization_example' # str | (optional)
try:
# Get entity details
api_response = await api_instance.get_entity(bank_id, entity_id, authorization=authorization)
print("The response of EntitiesApi->get_entity:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EntitiesApi->get_entity: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**entity_id** | **str**| |
**authorization** | **str**| | [optional]
### Return type
[**EntityDetailResponse**](EntityDetailResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **list_entities**
> EntityListResponse list_entities(bank_id, limit=limit, authorization=authorization)
List entities
List all entities (people, organizations, etc.) known by the bank, ordered by mention count.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.entity_list_response import EntityListResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.EntitiesApi(api_client)
bank_id = 'bank_id_example' # str |
limit = 100 # int | Maximum number of entities to return (optional) (default to 100)
authorization = 'authorization_example' # str | (optional)
try:
# List entities
api_response = await api_instance.list_entities(bank_id, limit=limit, authorization=authorization)
print("The response of EntitiesApi->list_entities:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EntitiesApi->list_entities: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**limit** | **int**| Maximum number of entities to return | [optional] [default to 100]
**authorization** | **str**| | [optional]
### Return type
[**EntityListResponse**](EntityListResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **regenerate_entity_observations**
> EntityDetailResponse regenerate_entity_observations(bank_id, entity_id, authorization=authorization)
Regenerate entity observations
Regenerate observations for an entity based on all facts mentioning it.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.entity_detail_response import EntityDetailResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.EntitiesApi(api_client)
bank_id = 'bank_id_example' # str |
entity_id = 'entity_id_example' # str |
authorization = 'authorization_example' # str | (optional)
try:
# Regenerate entity observations
api_response = await api_instance.regenerate_entity_observations(bank_id, entity_id, authorization=authorization)
print("The response of EntitiesApi->regenerate_entity_observations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EntitiesApi->regenerate_entity_observations: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**entity_id** | **str**| |
**authorization** | **str**| | [optional]
### Return type
[**EntityDetailResponse**](EntityDetailResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)

View file

@ -1,36 +0,0 @@
# EntityDetailResponse
Response model for entity detail endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
**canonical_name** | **str** | |
**mention_count** | **int** | |
**first_seen** | **str** | | [optional]
**last_seen** | **str** | | [optional]
**metadata** | **Dict[str, object]** | | [optional]
**observations** | [**List[EntityObservationResponse]**](EntityObservationResponse.md) | |
## Example
```python
from hindsight_client_api.models.entity_detail_response import EntityDetailResponse
# TODO update the JSON string below
json = "{}"
# create an instance of EntityDetailResponse from a JSON string
entity_detail_response_instance = EntityDetailResponse.from_json(json)
# print the JSON string representation of the object
print(EntityDetailResponse.to_json())
# convert the object into a dict
entity_detail_response_dict = entity_detail_response_instance.to_dict()
# create an instance of EntityDetailResponse from a dict
entity_detail_response_from_dict = EntityDetailResponse.from_dict(entity_detail_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)

View file

@ -1,30 +0,0 @@
# EntityIncludeOptions
Options for including entity observations in recall results.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**max_tokens** | **int** | Maximum tokens for entity observations | [optional] [default to 500]
## Example
```python
from hindsight_client_api.models.entity_include_options import EntityIncludeOptions
# TODO update the JSON string below
json = "{}"
# create an instance of EntityIncludeOptions from a JSON string
entity_include_options_instance = EntityIncludeOptions.from_json(json)
# print the JSON string representation of the object
print(EntityIncludeOptions.to_json())
# convert the object into a dict
entity_include_options_dict = entity_include_options_instance.to_dict()
# create an instance of EntityIncludeOptions from a dict
entity_include_options_from_dict = EntityIncludeOptions.from_dict(entity_include_options_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)

View file

@ -1,35 +0,0 @@
# EntityListItem
Entity list item with summary.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
**canonical_name** | **str** | |
**mention_count** | **int** | |
**first_seen** | **str** | | [optional]
**last_seen** | **str** | | [optional]
**metadata** | **Dict[str, object]** | | [optional]
## Example
```python
from hindsight_client_api.models.entity_list_item import EntityListItem
# TODO update the JSON string below
json = "{}"
# create an instance of EntityListItem from a JSON string
entity_list_item_instance = EntityListItem.from_json(json)
# print the JSON string representation of the object
print(EntityListItem.to_json())
# convert the object into a dict
entity_list_item_dict = entity_list_item_instance.to_dict()
# create an instance of EntityListItem from a dict
entity_list_item_from_dict = EntityListItem.from_dict(entity_list_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)

View file

@ -1,30 +0,0 @@
# EntityListResponse
Response model for entity list endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**List[EntityListItem]**](EntityListItem.md) | |
## Example
```python
from hindsight_client_api.models.entity_list_response import EntityListResponse
# TODO update the JSON string below
json = "{}"
# create an instance of EntityListResponse from a JSON string
entity_list_response_instance = EntityListResponse.from_json(json)
# print the JSON string representation of the object
print(EntityListResponse.to_json())
# convert the object into a dict
entity_list_response_dict = entity_list_response_instance.to_dict()
# create an instance of EntityListResponse from a dict
entity_list_response_from_dict = EntityListResponse.from_dict(entity_list_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)

View file

@ -1,31 +0,0 @@
# EntityObservationResponse
An observation about an entity.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**text** | **str** | |
**mentioned_at** | **str** | | [optional]
## Example
```python
from hindsight_client_api.models.entity_observation_response import EntityObservationResponse
# TODO update the JSON string below
json = "{}"
# create an instance of EntityObservationResponse from a JSON string
entity_observation_response_instance = EntityObservationResponse.from_json(json)
# print the JSON string representation of the object
print(EntityObservationResponse.to_json())
# convert the object into a dict
entity_observation_response_dict = entity_observation_response_instance.to_dict()
# create an instance of EntityObservationResponse from a dict
entity_observation_response_from_dict = EntityObservationResponse.from_dict(entity_observation_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)

View file

@ -1,32 +0,0 @@
# EntityStateResponse
Current mental model of an entity.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entity_id** | **str** | |
**canonical_name** | **str** | |
**observations** | [**List[EntityObservationResponse]**](EntityObservationResponse.md) | |
## Example
```python
from hindsight_client_api.models.entity_state_response import EntityStateResponse
# TODO update the JSON string below
json = "{}"
# create an instance of EntityStateResponse from a JSON string
entity_state_response_instance = EntityStateResponse.from_json(json)
# print the JSON string representation of the object
print(EntityStateResponse.to_json())
# convert the object into a dict
entity_state_response_dict = entity_state_response_instance.to_dict()
# create an instance of EntityStateResponse from a dict
entity_state_response_from_dict = EntityStateResponse.from_dict(entity_state_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)

View file

@ -1,33 +0,0 @@
# GraphDataResponse
Response model for graph data endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**nodes** | **List[Dict[str, object]]** | |
**edges** | **List[Dict[str, object]]** | |
**table_rows** | **List[Dict[str, object]]** | |
**total_units** | **int** | |
## Example
```python
from hindsight_client_api.models.graph_data_response import GraphDataResponse
# TODO update the JSON string below
json = "{}"
# create an instance of GraphDataResponse from a JSON string
graph_data_response_instance = GraphDataResponse.from_json(json)
# print the JSON string representation of the object
print(GraphDataResponse.to_json())
# convert the object into a dict
graph_data_response_dict = graph_data_response_instance.to_dict()
# create an instance of GraphDataResponse from a dict
graph_data_response_from_dict = GraphDataResponse.from_dict(graph_data_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)

View file

@ -1,29 +0,0 @@
# HTTPValidationError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**detail** | [**List[ValidationError]**](ValidationError.md) | | [optional]
## Example
```python
from hindsight_client_api.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)

View file

@ -1,31 +0,0 @@
# IncludeOptions
Options for including additional data in recall results.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entities** | [**EntityIncludeOptions**](EntityIncludeOptions.md) | | [optional]
**chunks** | [**ChunkIncludeOptions**](ChunkIncludeOptions.md) | | [optional]
## Example
```python
from hindsight_client_api.models.include_options import IncludeOptions
# TODO update the JSON string below
json = "{}"
# create an instance of IncludeOptions from a JSON string
include_options_instance = IncludeOptions.from_json(json)
# print the JSON string representation of the object
print(IncludeOptions.to_json())
# convert the object into a dict
include_options_dict = include_options_instance.to_dict()
# create an instance of IncludeOptions from a dict
include_options_from_dict = IncludeOptions.from_dict(include_options_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)

View file

@ -1,33 +0,0 @@
# ListDocumentsResponse
Response model for list documents endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | **List[Dict[str, object]]** | |
**total** | **int** | |
**limit** | **int** | |
**offset** | **int** | |
## Example
```python
from hindsight_client_api.models.list_documents_response import ListDocumentsResponse
# TODO update the JSON string below
json = "{}"
# create an instance of ListDocumentsResponse from a JSON string
list_documents_response_instance = ListDocumentsResponse.from_json(json)
# print the JSON string representation of the object
print(ListDocumentsResponse.to_json())
# convert the object into a dict
list_documents_response_dict = list_documents_response_instance.to_dict()
# create an instance of ListDocumentsResponse from a dict
list_documents_response_from_dict = ListDocumentsResponse.from_dict(list_documents_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)

View file

@ -1,33 +0,0 @@
# ListMemoryUnitsResponse
Response model for list memory units endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | **List[Dict[str, object]]** | |
**total** | **int** | |
**limit** | **int** | |
**offset** | **int** | |
## Example
```python
from hindsight_client_api.models.list_memory_units_response import ListMemoryUnitsResponse
# TODO update the JSON string below
json = "{}"
# create an instance of ListMemoryUnitsResponse from a JSON string
list_memory_units_response_instance = ListMemoryUnitsResponse.from_json(json)
# print the JSON string representation of the object
print(ListMemoryUnitsResponse.to_json())
# convert the object into a dict
list_memory_units_response_dict = list_memory_units_response_instance.to_dict()
# create an instance of ListMemoryUnitsResponse from a dict
list_memory_units_response_from_dict = ListMemoryUnitsResponse.from_dict(list_memory_units_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)

View file

@ -1,499 +0,0 @@
# hindsight_client_api.MemoryApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**clear_bank_memories**](MemoryApi.md#clear_bank_memories) | **DELETE** /v1/default/banks/{bank_id}/memories | Clear memory bank memories
[**get_graph**](MemoryApi.md#get_graph) | **GET** /v1/default/banks/{bank_id}/graph | Get memory graph data
[**list_memories**](MemoryApi.md#list_memories) | **GET** /v1/default/banks/{bank_id}/memories/list | List memory units
[**recall_memories**](MemoryApi.md#recall_memories) | **POST** /v1/default/banks/{bank_id}/memories/recall | Recall memory
[**reflect**](MemoryApi.md#reflect) | **POST** /v1/default/banks/{bank_id}/reflect | Reflect and generate answer
[**retain_memories**](MemoryApi.md#retain_memories) | **POST** /v1/default/banks/{bank_id}/memories | Retain memories
# **clear_bank_memories**
> DeleteResponse clear_bank_memories(bank_id, type=type, authorization=authorization)
Clear memory bank memories
Delete memory units for a memory bank. Optionally filter by type (world, experience, opinion) to delete only specific types. This is a destructive operation that cannot be undone. The bank profile (disposition and background) will be preserved.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.delete_response import DeleteResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.MemoryApi(api_client)
bank_id = 'bank_id_example' # str |
type = 'type_example' # str | Optional fact type filter (world, experience, opinion) (optional)
authorization = 'authorization_example' # str | (optional)
try:
# Clear memory bank memories
api_response = await api_instance.clear_bank_memories(bank_id, type=type, authorization=authorization)
print("The response of MemoryApi->clear_bank_memories:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MemoryApi->clear_bank_memories: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**type** | **str**| Optional fact type filter (world, experience, opinion) | [optional]
**authorization** | **str**| | [optional]
### Return type
[**DeleteResponse**](DeleteResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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_graph**
> GraphDataResponse get_graph(bank_id, type=type, authorization=authorization)
Get memory graph data
Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion). Limited to 1000 most recent items.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.graph_data_response import GraphDataResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.MemoryApi(api_client)
bank_id = 'bank_id_example' # str |
type = 'type_example' # str | (optional)
authorization = 'authorization_example' # str | (optional)
try:
# Get memory graph data
api_response = await api_instance.get_graph(bank_id, type=type, authorization=authorization)
print("The response of MemoryApi->get_graph:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MemoryApi->get_graph: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**type** | **str**| | [optional]
**authorization** | **str**| | [optional]
### Return type
[**GraphDataResponse**](GraphDataResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **list_memories**
> ListMemoryUnitsResponse list_memories(bank_id, type=type, q=q, limit=limit, offset=offset, authorization=authorization)
List memory units
List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.list_memory_units_response import ListMemoryUnitsResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.MemoryApi(api_client)
bank_id = 'bank_id_example' # str |
type = 'type_example' # str | (optional)
q = 'q_example' # str | (optional)
limit = 100 # int | (optional) (default to 100)
offset = 0 # int | (optional) (default to 0)
authorization = 'authorization_example' # str | (optional)
try:
# List memory units
api_response = await api_instance.list_memories(bank_id, type=type, q=q, limit=limit, offset=offset, authorization=authorization)
print("The response of MemoryApi->list_memories:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MemoryApi->list_memories: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**type** | **str**| | [optional]
**q** | **str**| | [optional]
**limit** | **int**| | [optional] [default to 100]
**offset** | **int**| | [optional] [default to 0]
**authorization** | **str**| | [optional]
### Return type
[**ListMemoryUnitsResponse**](ListMemoryUnitsResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **recall_memories**
> RecallResponse recall_memories(bank_id, recall_request, authorization=authorization)
Recall memory
Recall memory using semantic similarity and spreading activation.
The type parameter is optional and must be one of:
- `world`: General knowledge about people, places, events, and things that happen
- `experience`: Memories about experience, conversations, actions taken, and tasks performed
- `opinion`: The bank's formed beliefs, perspectives, and viewpoints
Set `include_entities=true` to get entity observations alongside recall results.
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.recall_request import RecallRequest
from hindsight_client_api.models.recall_response import RecallResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.MemoryApi(api_client)
bank_id = 'bank_id_example' # str |
recall_request = hindsight_client_api.RecallRequest() # RecallRequest |
authorization = 'authorization_example' # str | (optional)
try:
# Recall memory
api_response = await api_instance.recall_memories(bank_id, recall_request, authorization=authorization)
print("The response of MemoryApi->recall_memories:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MemoryApi->recall_memories: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**recall_request** | [**RecallRequest**](RecallRequest.md)| |
**authorization** | **str**| | [optional]
### Return type
[**RecallResponse**](RecallResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **reflect**
> ReflectResponse reflect(bank_id, reflect_request, authorization=authorization)
Reflect and generate answer
Reflect and formulate an answer using bank identity, world facts, and opinions.
This endpoint:
1. Retrieves experience (conversations and events)
2. Retrieves world facts relevant to the query
3. Retrieves existing opinions (bank's perspectives)
4. Uses LLM to formulate a contextual answer
5. Extracts and stores any new opinions formed
6. Returns plain text answer, the facts used, and new opinions
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.reflect_request import ReflectRequest
from hindsight_client_api.models.reflect_response import ReflectResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.MemoryApi(api_client)
bank_id = 'bank_id_example' # str |
reflect_request = hindsight_client_api.ReflectRequest() # ReflectRequest |
authorization = 'authorization_example' # str | (optional)
try:
# Reflect and generate answer
api_response = await api_instance.reflect(bank_id, reflect_request, authorization=authorization)
print("The response of MemoryApi->reflect:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MemoryApi->reflect: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**reflect_request** | [**ReflectRequest**](ReflectRequest.md)| |
**authorization** | **str**| | [optional]
### Return type
[**ReflectResponse**](ReflectResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **retain_memories**
> RetainResponse retain_memories(bank_id, retain_request, authorization=authorization)
Retain memories
Retain memory items with automatic fact extraction.
This is the main endpoint for storing memories. It supports both synchronous and asynchronous processing via the `async` parameter.
**Features:**
- Efficient batch processing
- Automatic fact extraction from natural language
- Entity recognition and linking
- Document tracking with automatic upsert (when document_id is provided)
- Temporal and semantic linking
- Optional asynchronous processing
**The system automatically:**
1. Extracts semantic facts from the content
2. Generates embeddings
3. Deduplicates similar facts
4. Creates temporal, semantic, and entity links
5. Tracks document metadata
**When `async=true`:** Returns immediately after queuing. Use the operations endpoint to monitor progress.
**When `async=false` (default):** Waits for processing to complete.
**Note:** If a memory item has a `document_id` that already exists, the old document and its memory units will be deleted before creating new ones (upsert behavior).
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.retain_request import RetainRequest
from hindsight_client_api.models.retain_response import RetainResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.MemoryApi(api_client)
bank_id = 'bank_id_example' # str |
retain_request = hindsight_client_api.RetainRequest() # RetainRequest |
authorization = 'authorization_example' # str | (optional)
try:
# Retain memories
api_response = await api_instance.retain_memories(bank_id, retain_request, authorization=authorization)
print("The response of MemoryApi->retain_memories:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MemoryApi->retain_memories: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**retain_request** | [**RetainRequest**](RetainRequest.md)| |
**authorization** | **str**| | [optional]
### Return type
[**RetainResponse**](RetainResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)

View file

@ -1,34 +0,0 @@
# MemoryItem
Single memory item for retain.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | **str** | |
**timestamp** | **datetime** | | [optional]
**context** | **str** | | [optional]
**metadata** | **Dict[str, str]** | | [optional]
**document_id** | **str** | | [optional]
## Example
```python
from hindsight_client_api.models.memory_item import MemoryItem
# TODO update the JSON string below
json = "{}"
# create an instance of MemoryItem from a JSON string
memory_item_instance = MemoryItem.from_json(json)
# print the JSON string representation of the object
print(MemoryItem.to_json())
# convert the object into a dict
memory_item_dict = memory_item_instance.to_dict()
# create an instance of MemoryItem from a dict
memory_item_from_dict = MemoryItem.from_dict(memory_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)

View file

@ -1,136 +0,0 @@
# hindsight_client_api.MonitoringApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**health_endpoint_health_get**](MonitoringApi.md#health_endpoint_health_get) | **GET** /health | Health check endpoint
[**metrics_endpoint_metrics_get**](MonitoringApi.md#metrics_endpoint_metrics_get) | **GET** /metrics | Prometheus metrics endpoint
# **health_endpoint_health_get**
> object health_endpoint_health_get()
Health check endpoint
Checks the health of the API and database connection
### Example
```python
import hindsight_client_api
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.MonitoringApi(api_client)
try:
# Health check endpoint
api_response = await api_instance.health_endpoint_health_get()
print("The response of MonitoringApi->health_endpoint_health_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MonitoringApi->health_endpoint_health_get: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
**object**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
[[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)
# **metrics_endpoint_metrics_get**
> object metrics_endpoint_metrics_get()
Prometheus metrics endpoint
Exports metrics in Prometheus format for scraping
### Example
```python
import hindsight_client_api
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.MonitoringApi(api_client)
try:
# Prometheus metrics endpoint
api_response = await api_instance.metrics_endpoint_metrics_get()
print("The response of MonitoringApi->metrics_endpoint_metrics_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MonitoringApi->metrics_endpoint_metrics_get: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
**object**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
[[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)

View file

@ -1,36 +0,0 @@
# OperationResponse
Response model for a single async operation.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
**task_type** | **str** | |
**items_count** | **int** | |
**document_id** | **str** | |
**created_at** | **str** | |
**status** | **str** | |
**error_message** | **str** | |
## Example
```python
from hindsight_client_api.models.operation_response import OperationResponse
# TODO update the JSON string below
json = "{}"
# create an instance of OperationResponse from a JSON string
operation_response_instance = OperationResponse.from_json(json)
# print the JSON string representation of the object
print(OperationResponse.to_json())
# convert the object into a dict
operation_response_dict = operation_response_instance.to_dict()
# create an instance of OperationResponse from a dict
operation_response_from_dict = OperationResponse.from_dict(operation_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)

View file

@ -1,154 +0,0 @@
# hindsight_client_api.OperationsApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**cancel_operation**](OperationsApi.md#cancel_operation) | **DELETE** /v1/default/banks/{bank_id}/operations/{operation_id} | Cancel a pending async operation
[**list_operations**](OperationsApi.md#list_operations) | **GET** /v1/default/banks/{bank_id}/operations | List async operations
# **cancel_operation**
> CancelOperationResponse cancel_operation(bank_id, operation_id, authorization=authorization)
Cancel a pending async operation
Cancel a pending async operation by removing it from the queue
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.cancel_operation_response import CancelOperationResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.OperationsApi(api_client)
bank_id = 'bank_id_example' # str |
operation_id = 'operation_id_example' # str |
authorization = 'authorization_example' # str | (optional)
try:
# Cancel a pending async operation
api_response = await api_instance.cancel_operation(bank_id, operation_id, authorization=authorization)
print("The response of OperationsApi->cancel_operation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OperationsApi->cancel_operation: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**operation_id** | **str**| |
**authorization** | **str**| | [optional]
### Return type
[**CancelOperationResponse**](CancelOperationResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)
# **list_operations**
> OperationsListResponse list_operations(bank_id, authorization=authorization)
List async operations
Get a list of all async operations (pending and failed) for a specific agent, including error messages for failed operations
### Example
```python
import hindsight_client_api
from hindsight_client_api.models.operations_list_response import OperationsListResponse
from hindsight_client_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = hindsight_client_api.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
async with hindsight_client_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hindsight_client_api.OperationsApi(api_client)
bank_id = 'bank_id_example' # str |
authorization = 'authorization_example' # str | (optional)
try:
# List async operations
api_response = await api_instance.list_operations(bank_id, authorization=authorization)
print("The response of OperationsApi->list_operations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OperationsApi->list_operations: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bank_id** | **str**| |
**authorization** | **str**| | [optional]
### Return type
[**OperationsListResponse**](OperationsListResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
[[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)

View file

@ -1,31 +0,0 @@
# OperationsListResponse
Response model for list operations endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bank_id** | **str** | |
**operations** | [**List[OperationResponse]**](OperationResponse.md) | |
## Example
```python
from hindsight_client_api.models.operations_list_response import OperationsListResponse
# TODO update the JSON string below
json = "{}"
# create an instance of OperationsListResponse from a JSON string
operations_list_response_instance = OperationsListResponse.from_json(json)
# print the JSON string representation of the object
print(OperationsListResponse.to_json())
# convert the object into a dict
operations_list_response_dict = operations_list_response_instance.to_dict()
# create an instance of OperationsListResponse from a dict
operations_list_response_from_dict = OperationsListResponse.from_dict(operations_list_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)

View file

@ -1,36 +0,0 @@
# RecallRequest
Request model for recall endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**query** | **str** | |
**types** | **List[str]** | | [optional]
**budget** | [**Budget**](Budget.md) | | [optional]
**max_tokens** | **int** | | [optional] [default to 4096]
**trace** | **bool** | | [optional] [default to False]
**query_timestamp** | **str** | | [optional]
**include** | [**IncludeOptions**](IncludeOptions.md) | Options for including additional data (entities are included by default) | [optional]
## Example
```python
from hindsight_client_api.models.recall_request import RecallRequest
# TODO update the JSON string below
json = "{}"
# create an instance of RecallRequest from a JSON string
recall_request_instance = RecallRequest.from_json(json)
# print the JSON string representation of the object
print(RecallRequest.to_json())
# convert the object into a dict
recall_request_dict = recall_request_instance.to_dict()
# create an instance of RecallRequest from a dict
recall_request_from_dict = RecallRequest.from_dict(recall_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)

View file

@ -1,33 +0,0 @@
# RecallResponse
Response model for recall endpoints.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**results** | [**List[RecallResult]**](RecallResult.md) | |
**trace** | **Dict[str, object]** | | [optional]
**entities** | [**Dict[str, EntityStateResponse]**](EntityStateResponse.md) | | [optional]
**chunks** | [**Dict[str, ChunkData]**](ChunkData.md) | | [optional]
## Example
```python
from hindsight_client_api.models.recall_response import RecallResponse
# TODO update the JSON string below
json = "{}"
# create an instance of RecallResponse from a JSON string
recall_response_instance = RecallResponse.from_json(json)
# print the JSON string representation of the object
print(RecallResponse.to_json())
# convert the object into a dict
recall_response_dict = recall_response_instance.to_dict()
# create an instance of RecallResponse from a dict
recall_response_from_dict = RecallResponse.from_dict(recall_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)

View file

@ -1,40 +0,0 @@
# RecallResult
Single recall result item.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
**text** | **str** | |
**type** | **str** | | [optional]
**entities** | **List[str]** | | [optional]
**context** | **str** | | [optional]
**occurred_start** | **str** | | [optional]
**occurred_end** | **str** | | [optional]
**mentioned_at** | **str** | | [optional]
**document_id** | **str** | | [optional]
**metadata** | **Dict[str, str]** | | [optional]
**chunk_id** | **str** | | [optional]
## Example
```python
from hindsight_client_api.models.recall_result import RecallResult
# TODO update the JSON string below
json = "{}"
# create an instance of RecallResult from a JSON string
recall_result_instance = RecallResult.from_json(json)
# print the JSON string representation of the object
print(RecallResult.to_json())
# convert the object into a dict
recall_result_dict = recall_result_instance.to_dict()
# create an instance of RecallResult from a dict
recall_result_from_dict = RecallResult.from_dict(recall_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)

View file

@ -1,35 +0,0 @@
# ReflectFact
A fact used in think response.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]
**text** | **str** | |
**type** | **str** | | [optional]
**context** | **str** | | [optional]
**occurred_start** | **str** | | [optional]
**occurred_end** | **str** | | [optional]
## Example
```python
from hindsight_client_api.models.reflect_fact import ReflectFact
# TODO update the JSON string below
json = "{}"
# create an instance of ReflectFact from a JSON string
reflect_fact_instance = ReflectFact.from_json(json)
# print the JSON string representation of the object
print(ReflectFact.to_json())
# convert the object into a dict
reflect_fact_dict = reflect_fact_instance.to_dict()
# create an instance of ReflectFact from a dict
reflect_fact_from_dict = ReflectFact.from_dict(reflect_fact_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)

View file

@ -1,30 +0,0 @@
# ReflectIncludeOptions
Options for including additional data in reflect results.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**facts** | **object** | Options for including facts (based_on) in reflect results. | [optional]
## Example
```python
from hindsight_client_api.models.reflect_include_options import ReflectIncludeOptions
# TODO update the JSON string below
json = "{}"
# create an instance of ReflectIncludeOptions from a JSON string
reflect_include_options_instance = ReflectIncludeOptions.from_json(json)
# print the JSON string representation of the object
print(ReflectIncludeOptions.to_json())
# convert the object into a dict
reflect_include_options_dict = reflect_include_options_instance.to_dict()
# create an instance of ReflectIncludeOptions from a dict
reflect_include_options_from_dict = ReflectIncludeOptions.from_dict(reflect_include_options_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)

View file

@ -1,35 +0,0 @@
# ReflectRequest
Request model for reflect endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**query** | **str** | |
**budget** | [**Budget**](Budget.md) | | [optional]
**context** | **str** | | [optional]
**max_tokens** | **int** | Maximum tokens for the response | [optional] [default to 4096]
**include** | [**ReflectIncludeOptions**](ReflectIncludeOptions.md) | Options for including additional data (disabled by default) | [optional]
**response_schema** | **Dict[str, object]** | | [optional]
## Example
```python
from hindsight_client_api.models.reflect_request import ReflectRequest
# TODO update the JSON string below
json = "{}"
# create an instance of ReflectRequest from a JSON string
reflect_request_instance = ReflectRequest.from_json(json)
# print the JSON string representation of the object
print(ReflectRequest.to_json())
# convert the object into a dict
reflect_request_dict = reflect_request_instance.to_dict()
# create an instance of ReflectRequest from a dict
reflect_request_from_dict = ReflectRequest.from_dict(reflect_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)

View file

@ -1,32 +0,0 @@
# ReflectResponse
Response model for think endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**text** | **str** | |
**based_on** | [**List[ReflectFact]**](ReflectFact.md) | | [optional] [default to []]
**structured_output** | **Dict[str, object]** | | [optional]
## Example
```python
from hindsight_client_api.models.reflect_response import ReflectResponse
# TODO update the JSON string below
json = "{}"
# create an instance of ReflectResponse from a JSON string
reflect_response_instance = ReflectResponse.from_json(json)
# print the JSON string representation of the object
print(ReflectResponse.to_json())
# convert the object into a dict
reflect_response_dict = reflect_response_instance.to_dict()
# create an instance of ReflectResponse from a dict
reflect_response_from_dict = ReflectResponse.from_dict(reflect_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)

View file

@ -1,31 +0,0 @@
# RetainRequest
Request model for retain endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**List[MemoryItem]**](MemoryItem.md) | |
**var_async** | **bool** | If true, process asynchronously in background. If false, wait for completion (default: false) | [optional] [default to False]
## Example
```python
from hindsight_client_api.models.retain_request import RetainRequest
# TODO update the JSON string below
json = "{}"
# create an instance of RetainRequest from a JSON string
retain_request_instance = RetainRequest.from_json(json)
# print the JSON string representation of the object
print(RetainRequest.to_json())
# convert the object into a dict
retain_request_dict = retain_request_instance.to_dict()
# create an instance of RetainRequest from a dict
retain_request_from_dict = RetainRequest.from_dict(retain_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)

View file

@ -1,33 +0,0 @@
# RetainResponse
Response model for retain endpoint.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**success** | **bool** | |
**bank_id** | **str** | |
**items_count** | **int** | |
**var_async** | **bool** | Whether the operation was processed asynchronously |
## Example
```python
from hindsight_client_api.models.retain_response import RetainResponse
# TODO update the JSON string below
json = "{}"
# create an instance of RetainResponse from a JSON string
retain_response_instance = RetainResponse.from_json(json)
# print the JSON string representation of the object
print(RetainResponse.to_json())
# convert the object into a dict
retain_response_dict = retain_response_instance.to_dict()
# create an instance of RetainResponse from a dict
retain_response_from_dict = RetainResponse.from_dict(retain_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)

View file

@ -1,30 +0,0 @@
# UpdateDispositionRequest
Request model for updating disposition traits.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**disposition** | [**DispositionTraits**](DispositionTraits.md) | |
## Example
```python
from hindsight_client_api.models.update_disposition_request import UpdateDispositionRequest
# TODO update the JSON string below
json = "{}"
# create an instance of UpdateDispositionRequest from a JSON string
update_disposition_request_instance = UpdateDispositionRequest.from_json(json)
# print the JSON string representation of the object
print(UpdateDispositionRequest.to_json())
# convert the object into a dict
update_disposition_request_dict = update_disposition_request_instance.to_dict()
# create an instance of UpdateDispositionRequest from a dict
update_disposition_request_from_dict = UpdateDispositionRequest.from_dict(update_disposition_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)

View file

@ -1,31 +0,0 @@
# ValidationError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | |
**msg** | **str** | |
**type** | **str** | |
## Example
```python
from hindsight_client_api.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)

View file

@ -1,28 +0,0 @@
# ValidationErrorLocInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Example
```python
from hindsight_client_api.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)

View file

@ -150,13 +150,6 @@ class ApiException(OpenApiException):
if http_resp.status == 404:
raise NotFoundException(http_resp=http_resp, body=body, data=data)
# Added new conditions for 409 and 422
if http_resp.status == 409:
raise ConflictException(http_resp=http_resp, body=body, data=data)
if http_resp.status == 422:
raise UnprocessableEntityException(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)
@ -169,11 +162,8 @@ class ApiException(OpenApiException):
error_message += "HTTP response headers: {0}\n".format(
self.headers)
if self.body:
error_message += "HTTP response body: {0}\n".format(self.body)
if self.data:
error_message += "HTTP response data: {0}\n".format(self.data)
if self.data or self.body:
error_message += "HTTP response body: {0}\n".format(self.data or self.body)
return error_message
@ -198,16 +188,6 @@ class ServiceException(ApiException):
pass
class ConflictException(ApiException):
"""Exception for HTTP 409 Conflict."""
pass
class UnprocessableEntityException(ApiException):
"""Exception for HTTP 422 Unprocessable Entity."""
pass
def render_path(path_to_item):
"""Returns a string representation of a path"""
result = ""

View file

@ -12,6 +12,7 @@
Do not edit the class manually.
""" # noqa: E501
# import models into model package
from hindsight_client_api.models.add_background_request import AddBackgroundRequest
from hindsight_client_api.models.background_response import BackgroundResponse
@ -56,4 +57,3 @@ from hindsight_client_api.models.retain_response import RetainResponse
from hindsight_client_api.models.update_disposition_request import UpdateDispositionRequest
from hindsight_client_api.models.validation_error import ValidationError
from hindsight_client_api.models.validation_error_loc_inner import ValidationErrorLocInner

View file

@ -22,16 +22,12 @@ from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class EntityInput(BaseModel):
"""
Entity to associate with retained content.
""" # noqa: E501
""" # noqa: E501
text: StrictStr = Field(description="The entity name/text")
type: Optional[StrictStr] = Field(
default=None, description="Optional entity type (e.g., 'PERSON', 'ORG', 'CONCEPT')"
)
type: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["text", "type"]
model_config = ConfigDict(
@ -40,12 +36,14 @@ class EntityInput(BaseModel):
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
@ -54,8 +52,17 @@ class EntityInput(BaseModel):
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias."""
excluded_fields: Set[str] = set([])
"""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.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
@ -65,7 +72,7 @@ class EntityInput(BaseModel):
# set to None if type (nullable) is None
# and model_fields_set contains the field
if self.type is None and "type" in self.model_fields_set:
_dict["type"] = None
_dict['type'] = None
return _dict
@ -78,5 +85,10 @@ class EntityInput(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({"text": obj.get("text"), "type": obj.get("type")})
_obj = cls.model_validate({
"text": obj.get("text"),
"type": obj.get("type")
})
return _obj

View file

@ -18,11 +18,11 @@ import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hindsight_client_api.models.entity_input import EntityInput
from typing import Optional, Set
from typing_extensions import Self
from hindsight_client_api.models.entity_input import EntityInput
class MemoryItem(BaseModel):
"""
@ -33,10 +33,7 @@ class MemoryItem(BaseModel):
context: Optional[StrictStr] = None
metadata: Optional[Dict[str, StrictStr]] = None
document_id: Optional[StrictStr] = None
entities: Optional[List[EntityInput]] = Field(
default=None,
description="Optional entities to combine with auto-extracted entities."
)
entities: Optional[List[EntityInput]] = None
__properties: ClassVar[List[str]] = ["content", "timestamp", "context", "metadata", "document_id", "entities"]
model_config = ConfigDict(
@ -78,6 +75,13 @@ class MemoryItem(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in entities (list)
_items = []
if self.entities:
for _item_entities in self.entities:
if _item_entities:
_items.append(_item_entities.to_dict())
_dict['entities'] = _items
# set to None if timestamp (nullable) is None
# and model_fields_set contains the field
if self.timestamp is None and "timestamp" in self.model_fields_set:

View file

@ -52,36 +52,75 @@ class RESTResponse(io.IOBase):
class RESTClientObject:
def __init__(self, configuration) -> None:
# maxsize is number of requests to host that are allowed in parallel
self.maxsize = configuration.connection_pool_maxsize
self.ssl_context = ssl.create_default_context(
cafile=configuration.ssl_ca_cert,
cadata=configuration.ca_cert_data,
)
if configuration.cert_file:
self.ssl_context.load_cert_chain(
configuration.cert_file, keyfile=configuration.key_file
)
if not configuration.verify_ssl:
self.ssl_context.check_hostname = False
self.ssl_context.verify_mode = ssl.CERT_NONE
# Store configuration for deferred initialization
# aiohttp.TCPConnector requires a running event loop, so we defer
# creation until the first request (which runs in async context)
self._configuration = configuration
self._pool_manager: Optional[aiohttp.ClientSession] = None
self._retry_client: Optional[aiohttp_retry.RetryClient] = None
self.proxy = configuration.proxy
self.proxy_headers = configuration.proxy_headers
self.retries = configuration.retries
def _ensure_session(self) -> None:
"""Create aiohttp session lazily (must be called from async context)."""
if self._pool_manager is not None:
return
self.pool_manager: Optional[aiohttp.ClientSession] = None
self.retry_client: Optional[aiohttp_retry.RetryClient] = None
configuration = self._configuration
maxsize = configuration.connection_pool_maxsize
async def close(self) -> None:
if self.pool_manager:
await self.pool_manager.close()
if self.retry_client is not None:
await self.retry_client.close()
ssl_context = ssl.create_default_context(
cafile=configuration.ssl_ca_cert
)
if configuration.cert_file:
ssl_context.load_cert_chain(
configuration.cert_file, keyfile=configuration.key_file
)
if not configuration.verify_ssl:
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE
connector = aiohttp.TCPConnector(
limit=maxsize,
ssl=ssl_context
)
self._pool_manager = aiohttp.ClientSession(
connector=connector,
trust_env=True
)
retries = configuration.retries
if retries is not None:
self._retry_client = aiohttp_retry.RetryClient(
client_session=self._pool_manager,
retry_options=aiohttp_retry.ExponentialRetry(
attempts=retries,
factor=2.0,
start_timeout=0.1,
max_timeout=120.0
)
)
@property
def pool_manager(self) -> aiohttp.ClientSession:
"""Get the pool manager, initializing if needed."""
self._ensure_session()
return self._pool_manager
@property
def retry_client(self) -> Optional[aiohttp_retry.RetryClient]:
"""Get the retry client, initializing if needed."""
self._ensure_session()
return self._retry_client
async def close(self):
if self._pool_manager is not None:
await self._pool_manager.close()
if self._retry_client is not None:
await self._retry_client.close()
async def request(
self,
@ -186,27 +225,10 @@ class RESTClientObject:
raise ApiException(status=0, reason=msg)
pool_manager: Union[aiohttp.ClientSession, aiohttp_retry.RetryClient]
# https pool manager
if self.pool_manager is None:
self.pool_manager = aiohttp.ClientSession(
connector=aiohttp.TCPConnector(limit=self.maxsize, ssl=self.ssl_context),
trust_env=True,
)
pool_manager = self.pool_manager
if self.retries is not None and method in ALLOW_RETRY_METHODS:
if self.retry_client is None:
self.retry_client = aiohttp_retry.RetryClient(
client_session=self.pool_manager,
retry_options=aiohttp_retry.ExponentialRetry(
attempts=self.retries,
factor=2.0,
start_timeout=0.1,
max_timeout=120.0
)
)
if self.retry_client is not None and method in ALLOW_RETRY_METHODS:
pool_manager = self.retry_client
else:
pool_manager = self.pool_manager
r = await pool_manager.request(**args)

View file

@ -3,7 +3,9 @@ projectName: hindsight-client
packageVersion: 0.0.7
library: asyncio
generateSourceCodeOnly: true
# Don't generate auto tests - we have our own integration tests
# Don't generate auto tests or docs - we have our own
globalProperties:
apiTests: false
modelTests: false
apiDocs: false
modelDocs: false

View file

@ -26,28 +26,6 @@ dependencies = [
"libc",
]
[[package]]
name = "async-stream"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476"
dependencies = [
"async-stream-impl",
"futures-core",
"pin-project-lite",
]
[[package]]
name = "async-stream-impl"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "atomic-waker"
version = "1.1.2"
@ -86,9 +64,9 @@ checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
[[package]]
name = "cc"
version = "1.2.50"
version = "1.2.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c"
checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203"
dependencies = [
"find-msvc-tools",
"shlex",
@ -180,9 +158,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "find-msvc-tools"
version = "0.1.5"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844"
checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff"
[[package]]
name = "fnv"
@ -627,9 +605,9 @@ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
[[package]]
name = "iri-string"
version = "0.7.9"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397"
checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a"
dependencies = [
"memchr",
"serde",
@ -637,9 +615,9 @@ dependencies = [
[[package]]
name = "itoa"
version = "1.0.16"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010"
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "js-sys"
@ -653,9 +631,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.178"
version = "0.2.179"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091"
checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f"
[[package]]
name = "linux-raw-sys"
@ -862,9 +840,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.103"
version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0"
dependencies = [
"unicode-ident",
]
@ -1109,9 +1087,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
[[package]]
name = "ryu"
version = "1.0.21"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea"
checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984"
[[package]]
name = "schannel"
@ -1230,15 +1208,15 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.146"
version = "1.0.148"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "217ca874ae0207aac254aa02c957ded05585a90892cc8d87f9e5fa49669dadd8"
checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
"serde_core",
"zmij",
]
[[package]]
@ -1286,10 +1264,11 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "signal-hook-registry"
version = "1.4.7"
version = "1.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad"
checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
dependencies = [
"errno",
"libc",
]
@ -1329,9 +1308,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
version = "2.0.111"
version = "2.0.113"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87"
checksum = "678faa00651c9eb72dd2020cbdf275d92eccb2400d568e419efdd64838145cb4"
dependencies = [
"proc-macro2",
"quote",
@ -1381,9 +1360,9 @@ dependencies = [
[[package]]
name = "tempfile"
version = "3.23.0"
version = "3.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16"
checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c"
dependencies = [
"fastrand",
"getrandom 0.3.4",
@ -1444,9 +1423,9 @@ dependencies = [
[[package]]
name = "tokio"
version = "1.48.0"
version = "1.49.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408"
checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86"
dependencies = [
"bytes",
"libc",
@ -1492,9 +1471,9 @@ dependencies = [
[[package]]
name = "tokio-stream"
version = "0.1.17"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70"
dependencies = [
"futures-core",
"pin-project-lite",
@ -1503,12 +1482,10 @@ dependencies = [
[[package]]
name = "tokio-test"
version = "0.4.4"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7"
checksum = "3f6d24790a10a7af737693a3e8f1d03faef7e6ca0cc99aae5066f533766de545"
dependencies = [
"async-stream",
"bytes",
"futures-core",
"tokio",
"tokio-stream",
@ -1516,9 +1493,9 @@ dependencies = [
[[package]]
name = "tokio-util"
version = "0.7.17"
version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594"
checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098"
dependencies = [
"bytes",
"futures-core",
@ -2122,3 +2099,9 @@ dependencies = [
"quote",
"syn",
]
[[package]]
name = "zmij"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30e0d8dffbae3d840f64bda38e28391faef673a7b5a6017840f2a106c8145868"

View file

@ -73,13 +73,15 @@ fn convert_anyof_to_nullable(value: &mut serde_json::Value) {
}
fn main() {
// Get the OpenAPI spec path from the project root (two levels up)
// Get the OpenAPI spec path from hindsight-docs/static (single source of truth)
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
let openapi_path = manifest_dir
.parent()
.unwrap()
.parent()
.unwrap()
.join("hindsight-docs")
.join("static")
.join("openapi.json");
// Tell Cargo to rebuild if the OpenAPI spec changes

View file

@ -63,6 +63,7 @@ mod tests {
document_id: None,
metadata: None,
timestamp: None,
entities: None,
},
types::MemoryItem {
content: "Bob works with Alice on the search team".to_string(),
@ -70,6 +71,7 @@ mod tests {
document_id: None,
metadata: None,
timestamp: None,
entities: None,
},
],
};

View file

@ -431,6 +431,26 @@ export type EntityIncludeOptions = {
max_tokens?: number;
};
/**
* EntityInput
*
* Entity to associate with retained content.
*/
export type EntityInput = {
/**
* Text
*
* The entity name/text
*/
text: string;
/**
* Type
*
* Optional entity type (e.g., 'PERSON', 'ORG', 'CONCEPT')
*/
type?: string | null;
};
/**
* EntityListItem
*
@ -660,6 +680,12 @@ export type MemoryItem = {
* Optional document ID for this memory item.
*/
document_id?: string | null;
/**
* Entities
*
* Optional entities to combine with auto-extracted entities.
*/
entities?: Array<EntityInput> | null;
};
/**

View file

@ -2,7 +2,7 @@ import { defineConfig } from '@hey-api/openapi-ts';
export default defineConfig({
client: '@hey-api/client-fetch',
input: '../../openapi.json',
input: '../../hindsight-docs/static/openapi.json',
output: {
path: './generated',
format: 'prettier',

View file

@ -16,11 +16,11 @@ from hindsight_api.api import create_app
def generate_openapi_spec(output_path: str = None):
"""Generate OpenAPI spec and save to file."""
# Default to root openapi.json if no path specified
# Default to hindsight-docs/static/openapi.json (single source of truth)
if output_path is None:
# Get the root of the project (3 levels up from this file)
root_dir = Path(__file__).parent.parent.parent
output_path = str(root_dir / "openapi.json")
output_path = str(root_dir / "hindsight-docs" / "static" / "openapi.json")
# Create a temporary memory instance for OpenAPI generation
_memory = MemoryEngine(

View file

@ -8,6 +8,27 @@ This changelog highlights user-facing changes only. Internal maintenance, CI/CD,
For full release details, see [GitHub Releases](https://github.com/vectorize-io/hindsight/releases).
## [0.2.0](https://github.com/vectorize-io/hindsight/releases/tag/v0.2.0)
**Features**
- Add additional model provider support, including Anthropic Claude and LM Studio. ([`787ed60`](https://github.com/vectorize-io/hindsight/commit/787ed60))
- Add multi-bank access and new MCP tools for interacting with multiple memory banks via MCP. ([`6b5f593`](https://github.com/vectorize-io/hindsight/commit/6b5f593))
- Allow supplying custom entities when retaining memories via the retain endpoint. ([`dd59bc8`](https://github.com/vectorize-io/hindsight/commit/dd59bc8))
- Enhance the /reflect endpoint with max_tokens control and optional structured output responses. ([`d49e820`](https://github.com/vectorize-io/hindsight/commit/d49e820))
**Improvements**
- Improve local LLM support for reasoning-capable models and streamline Docker startup for local deployments. ([`eea0f27`](https://github.com/vectorize-io/hindsight/commit/eea0f27))
- Support operation validator extensions and return proper HTTP errors when validation fails. ([`ce45d30`](https://github.com/vectorize-io/hindsight/commit/ce45d30))
- Add configurable observation thresholds to control when observations are created/updated. ([`54e2df0`](https://github.com/vectorize-io/hindsight/commit/54e2df0))
- Improve graph visualization to the control plane for exploring memory relationships. ([`1a62069`](https://github.com/vectorize-io/hindsight/commit/1a62069))
**Bug Fixes**
- Fix MCP server lifecycle handling so MCP lifespan is correctly tied to the FastAPI app lifespan. ([`6b78f7d`](https://github.com/vectorize-io/hindsight/commit/6b78f7d))
## [0.1.15](https://github.com/vectorize-io/hindsight/releases/tag/v0.1.15)
**Features**

View file

@ -81,7 +81,7 @@ const config: Config = {
specs: [
{
id: 'hindsight-api',
spec: 'openapi.json',
spec: 'static/openapi.json',
route: '/api-reference',
url: '/openapi.json',
},

File diff suppressed because it is too large Load diff

View file

@ -2297,6 +2297,33 @@
"title": "EntityIncludeOptions",
"description": "Options for including entity observations in recall results."
},
"EntityInput": {
"properties": {
"text": {
"type": "string",
"title": "Text",
"description": "The entity name/text"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Type",
"description": "Optional entity type (e.g., 'PERSON', 'ORG', 'CONCEPT')"
}
},
"type": "object",
"required": [
"text"
],
"title": "EntityInput",
"description": "Entity to associate with retained content."
},
"EntityListItem": {
"properties": {
"id": {
@ -2717,6 +2744,21 @@
],
"title": "Document Id",
"description": "Optional document ID for this memory item."
},
"entities": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/EntityInput"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Entities",
"description": "Optional entities to combine with auto-extracted entities."
}
},
"type": "object",
@ -2729,6 +2771,15 @@
"content": "Alice mentioned she's working on a new ML model",
"context": "team meeting",
"document_id": "meeting_notes_2024_01_15",
"entities": [
{
"text": "Alice"
},
{
"text": "ML model",
"type": "CONCEPT"
}
],
"metadata": {
"channel": "engineering",
"source": "slack"

File diff suppressed because it is too large Load diff

View file

@ -5,10 +5,13 @@ set -e
# Note: Rust client is auto-generated at build time via build.rs (uses progenitor)
# Usage: ./scripts/generate-clients.sh
# Pin openapi-generator version for reproducible builds across local and CI
OPENAPI_GENERATOR_VERSION="v7.10.0"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
CLIENTS_DIR="$PROJECT_ROOT/hindsight-clients"
OPENAPI_SPEC="$PROJECT_ROOT/openapi.json"
OPENAPI_SPEC="$PROJECT_ROOT/hindsight-docs/static/openapi.json"
echo "=================================================="
echo "Hindsight API Client Generator"
@ -38,6 +41,7 @@ if ! command -v docker &> /dev/null; then
exit 1
fi
echo "✓ Docker available"
echo "✓ Using openapi-generator ${OPENAPI_GENERATOR_VERSION}"
echo ""
# Generate Rust client
@ -100,12 +104,14 @@ done
echo "Generating new client with openapi-generator..."
cd "$PYTHON_CLIENT_DIR"
# Run openapi-generator via Docker
# Run openapi-generator via Docker (pinned version for reproducibility)
# Use --user to match current user's UID/GID so generated files are writable
docker run --rm \
--user "$(id -u):$(id -g)" \
-v "$OPENAPI_SPEC:/local/openapi.json" \
-v "$PYTHON_CLIENT_DIR:/local/out" \
-v "$PYTHON_CLIENT_DIR/openapi-generator-config.yaml:/local/config.yaml" \
openapitools/openapi-generator-cli generate \
"openapitools/openapi-generator-cli:${OPENAPI_GENERATOR_VERSION}" generate \
-i /local/openapi.json \
-g python \
-o /local/out \
@ -141,6 +147,162 @@ if [ -f "$PYTHON_CLIENT_DIR/hindsight_client_api_README.md" ]; then
rm "$PYTHON_CLIENT_DIR/hindsight_client_api_README.md"
fi
# Patch rest.py to defer aiohttp initialization (fixes "no running event loop" error)
# The generated code creates aiohttp.TCPConnector in __init__ which requires a running event loop.
# We patch it to defer initialization until the first request (which runs in async context).
echo "Patching rest.py for deferred aiohttp initialization..."
REST_FILE="$PYTHON_CLIENT_DIR/hindsight_client_api/rest.py"
if [ -f "$REST_FILE" ]; then
cd "$PROJECT_ROOT"
python3 << PATCH_SCRIPT
import re
rest_file = "$PYTHON_CLIENT_DIR/hindsight_client_api/rest.py"
with open(rest_file, 'r') as f:
content = f.read()
# Replace the __init__ method to defer initialization
old_init = '''class RESTClientObject:
def __init__(self, configuration) -> None:
# maxsize is number of requests to host that are allowed in parallel
maxsize = configuration.connection_pool_maxsize
ssl_context = ssl.create_default_context(
cafile=configuration.ssl_ca_cert
)
if configuration.cert_file:
ssl_context.load_cert_chain(
configuration.cert_file, keyfile=configuration.key_file
)
if not configuration.verify_ssl:
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE
connector = aiohttp.TCPConnector(
limit=maxsize,
ssl=ssl_context
)
self.proxy = configuration.proxy
self.proxy_headers = configuration.proxy_headers
# https pool manager
self.pool_manager = aiohttp.ClientSession(
connector=connector,
trust_env=True
)
retries = configuration.retries
self.retry_client: Optional[aiohttp_retry.RetryClient]
if retries is not None:
self.retry_client = aiohttp_retry.RetryClient(
client_session=self.pool_manager,
retry_options=aiohttp_retry.ExponentialRetry(
attempts=retries,
factor=2.0,
start_timeout=0.1,
max_timeout=120.0
)
)
else:
self.retry_client = None'''
new_init = '''class RESTClientObject:
def __init__(self, configuration) -> None:
# Store configuration for deferred initialization
# aiohttp.TCPConnector requires a running event loop, so we defer
# creation until the first request (which runs in async context)
self._configuration = configuration
self._pool_manager: Optional[aiohttp.ClientSession] = None
self._retry_client: Optional[aiohttp_retry.RetryClient] = None
self.proxy = configuration.proxy
self.proxy_headers = configuration.proxy_headers
def _ensure_session(self) -> None:
"""Create aiohttp session lazily (must be called from async context)."""
if self._pool_manager is not None:
return
configuration = self._configuration
maxsize = configuration.connection_pool_maxsize
ssl_context = ssl.create_default_context(
cafile=configuration.ssl_ca_cert
)
if configuration.cert_file:
ssl_context.load_cert_chain(
configuration.cert_file, keyfile=configuration.key_file
)
if not configuration.verify_ssl:
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE
connector = aiohttp.TCPConnector(
limit=maxsize,
ssl=ssl_context
)
self._pool_manager = aiohttp.ClientSession(
connector=connector,
trust_env=True
)
retries = configuration.retries
if retries is not None:
self._retry_client = aiohttp_retry.RetryClient(
client_session=self._pool_manager,
retry_options=aiohttp_retry.ExponentialRetry(
attempts=retries,
factor=2.0,
start_timeout=0.1,
max_timeout=120.0
)
)
@property
def pool_manager(self) -> aiohttp.ClientSession:
"""Get the pool manager, initializing if needed."""
self._ensure_session()
return self._pool_manager
@property
def retry_client(self) -> Optional[aiohttp_retry.RetryClient]:
"""Get the retry client, initializing if needed."""
self._ensure_session()
return self._retry_client'''
if old_init in content:
content = content.replace(old_init, new_init)
# Also update the close method to handle None pool_manager
old_close = ''' async def close(self):
await self.pool_manager.close()
if self.retry_client is not None:
await self.retry_client.close()'''
new_close = ''' async def close(self):
if self._pool_manager is not None:
await self._pool_manager.close()
if self._retry_client is not None:
await self._retry_client.close()'''
content = content.replace(old_close, new_close)
with open(rest_file, 'w') as f:
f.write(content)
print(" ✓ rest.py patched successfully")
else:
print(" ⚠ Could not find expected pattern in rest.py - skipping patch")
PATCH_SCRIPT
fi
echo "✓ Python client generated at $PYTHON_CLIENT_DIR"
echo ""

View file

@ -11,11 +11,6 @@ echo "Generating OpenAPI specification..."
cd hindsight-dev
uv run generate-openapi
echo ""
echo "Copying OpenAPI spec to documentation..."
cp "$ROOT_DIR/openapi.json" "$ROOT_DIR/hindsight-docs/openapi.json"
cp "$ROOT_DIR/openapi.json" "$ROOT_DIR/hindsight-docs/static/openapi.json"
echo ""
echo "Building documentation..."
cd "$ROOT_DIR/hindsight-docs"

10
uv.lock
View file

@ -1161,7 +1161,7 @@ wheels = [
[[package]]
name = "hindsight-all"
version = "0.1.16"
version = "0.2.0"
source = { editable = "hindsight" }
dependencies = [
{ name = "hindsight-api" },
@ -1185,7 +1185,7 @@ provides-extras = ["test"]
[[package]]
name = "hindsight-api"
version = "0.1.16"
version = "0.2.0"
source = { editable = "hindsight-api" }
dependencies = [
{ name = "alembic" },
@ -1293,7 +1293,7 @@ dev = [
[[package]]
name = "hindsight-client"
version = "0.1.16"
version = "0.2.0"
source = { editable = "hindsight-clients/python" }
dependencies = [
{ name = "aiohttp" },
@ -1327,7 +1327,7 @@ provides-extras = ["test"]
[[package]]
name = "hindsight-dev"
version = "0.1.16"
version = "0.2.0"
source = { editable = "hindsight-dev" }
dependencies = [
{ name = "hindsight-api" },
@ -1362,7 +1362,7 @@ dev = [
[[package]]
name = "hindsight-embed"
version = "0.1.16"
version = "0.2.0"
source = { editable = "hindsight-embed" }
dependencies = [
{ name = "httpx" },