Skip to content

Commit 74445eb

Browse files
minor changes
1 parent 3f26bad commit 74445eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/evaluation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
from dotenv import load_dotenv
33
from langchain_openai import ChatOpenAI
4-
from typing import Any, TypedDict
4+
from typing import Any, TypedDict, Union
55
from sympy import solve, Eq, simplify, Symbol, Function, integrate, diff
66
from sympy.parsing.sympy_parser import parse_expr, standard_transformations, implicit_multiplication_application
77
import re
@@ -11,7 +11,7 @@
1111

1212
class Result(TypedDict):
1313
is_correct: bool
14-
sympy_result: bool | None
14+
sympy_result: Union[bool, None]
1515
llm_result: bool
1616
mismatch_info: str
1717

@@ -144,7 +144,7 @@ def extract_symbols(expr: str) -> dict:
144144

145145
return symbol_dict
146146

147-
def is_equivalent_sympy(expr1, expr2, params) -> bool | None:
147+
def is_equivalent_sympy(expr1, expr2, params) -> Union[bool, None]:
148148
"""
149149
Return True/False if comparable with SymPy,
150150
or None if an error occurs.

0 commit comments

Comments
 (0)