Skip to content

Commit

Permalink
Fix MockChatModel bug
Browse files Browse the repository at this point in the history
  • Loading branch information
milesha committed Oct 29, 2024
1 parent af5ae94 commit e2e9097
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/intelligence-service/app/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
model: BaseChatModel

if os.getenv("GITHUB_ACTIONS") == "true":
# mock model for testing environment
class MockChatModel(BaseChatModel):
class MockChatModel():
def invoke(self, message: str):
return "Mock response"
model = MockChatModel()

elif settings.is_openai_available:
model = ChatOpenAI()
elif settings.is_azure_openai_available:
Expand Down

0 comments on commit e2e9097

Please sign in to comment.