Skip to content

Commit

Permalink
Fix Union for 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
leedotpang committed Sep 3, 2024
1 parent b62aa69 commit ee992f0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import logging
from time import time
from typing import Any, List
from typing import Any, List, Union

from langchain_core.chat_history import BaseChatMessageHistory
from langchain_core.messages import BaseMessage, message_to_dict, messages_from_dict
Expand Down Expand Up @@ -39,7 +39,9 @@ def __init__(
self.index = index
self.session_id = session_id

opensearch_connection: "OpenSearch" | None = kwargs.get("opensearch_connection")
opensearch_connection: Union["OpenSearch", None] = kwargs.get(
"opensearch_connection"
)

try:
from opensearchpy import OpenSearch
Expand Down

0 comments on commit ee992f0

Please sign in to comment.