Skip to content

Commit

Permalink
Fix for possible None in context.
Browse files Browse the repository at this point in the history
  • Loading branch information
Liraim committed May 21, 2024
1 parent a0fa743 commit 7290a81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/evidently/features/openai_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def generate_feature(self, data: pd.DataFrame, data_definition: DataDefinition)
context_column = repeat(self.context)

for message, context in zip(column_data, context_column):
context = "" if context is None else context
prompt_answer = func(
client,
model=self.model,
Expand Down

0 comments on commit 7290a81

Please sign in to comment.