Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-json
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: check-yaml
- id: check-json
- repo: https://github.com/psf/black
rev: 23.7.0
- id: isort
args: [ "--profile", "black" ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.282
hooks:
- id: ruff
- id: ruff

exclude: '^alignai/ingestion/v1alpha/'
9 changes: 7 additions & 2 deletions alignai/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
)
from alignai.ingestion.v1alpha.event_pb2 import Event, EventProperties
from alignai.logger import get_logger
from alignai.utils import CustomProperties, datetime_to_timestamp, serialize_custom_properties
from alignai.utils import (
CustomProperties,
datetime_to_timestamp,
serialize_custom_properties,
)
from alignai.validate import (
ValidationError,
validate_custom_properties_or_raise,
Expand Down Expand Up @@ -80,7 +84,8 @@ def open_session(
session_id (str): Session ID.
user_id (str): User ID associated with the session.
assistant_id (str, optional): Assistant ID. Defaults to "DEFAULT".
custom_properties (dict[str, str] | None, optional): Custom properties associated with the session. Defaults to None.
custom_properties (dict[str, str] | None, optional): Custom properties associated with the session.
Defaults to None.
"""
validate_session_id_or_raise(session_id)
validate_user_id_or_raise(user_id)
Expand Down
1 change: 1 addition & 0 deletions alignai/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Mapping

from google.protobuf.timestamp_pb2 import Timestamp

from alignai.ingestion.v1alpha.event_pb2 import EventProperties


Expand Down
Loading