Skip to content

Commit

Permalink
ResultChat class was modified
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin committed Aug 21, 2024
1 parent 525baf8 commit 9421b69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion evdschat/core/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from evdschat.model.chatters import ModelAbstract, OpenAI
from ..common.github_actions import PytestTesting
from typing import TypeVar, Tuple, Union
from .result import ResultChat
from .result import ResultChat , Status

# Result = TypeVar("Result")
Notes = TypeVar("Notes")
Expand Down
8 changes: 3 additions & 5 deletions evdschat/model/chatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@

import pandas as pd

from evdschat.core.result import Result, ResultChat , create_result
from evdschat.core.result import Result, ResultChat, create_result
from evdschat.core.result import Status




def get_myapi_url():
from dotenv import load_dotenv

Expand Down Expand Up @@ -108,12 +106,12 @@ def eval(self, kw: dict, permitted=None) -> Union[Tuple[Any, str], None]:
del kw["notes"]
try:
result = self.retrieve_fnc(kw["index"], **nkw)
res = create_result(result)
res = create_result(result, status=Status.success)
return res, notes
except Exception:
traceback.print_exc()

return create_result(None, "Eval failed") , str("")
return create_result(None, status=Status.failed, reason="Eval failed"), str("")

def decide_caller(self):
if self.test:
Expand Down

0 comments on commit 9421b69

Please sign in to comment.