Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
undo76 committed Dec 5, 2024
1 parent 6e2d053 commit 31ce3fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/raglite/_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class QuestionResponse(BaseModel):
""".strip()

class Config:
extra = "forbid" # Ensure no extra fields are allowed as required by OpenAI's strict mode.
extra = (
"forbid" # Ensure no extra fields are allowed as required by OpenAI's strict mode.
)

@field_validator("question")
@classmethod
Expand Down Expand Up @@ -115,6 +117,7 @@ class ContextEvalResponse(BaseModel):

class Config:
extra = "forbid" # Ensure no extra fields are allowed as required by OpenAI API's strict mode.

relevant_chunks = []
for candidate_chunk in tqdm(
candidate_chunks, desc="Evaluating chunks", unit="chunk", dynamic_ncols=True
Expand Down Expand Up @@ -152,6 +155,7 @@ class AnswerResponse(BaseModel):

class Config:
extra = "forbid" # Ensure no extra fields are allowed as required by OpenAI API's strict mode.

try:
answer_response = extract_with_llm(
AnswerResponse,
Expand Down

0 comments on commit 31ce3fe

Please sign in to comment.