Skip to content

Commit

Permalink
fix completion
Browse files Browse the repository at this point in the history
  • Loading branch information
emrgnt-cmplxty committed Feb 11, 2025
1 parent 4e88c40 commit 22adf3c
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions py/shared/api/models/retrieval/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ class Config:


class RAGResponse(BaseModel):
generated_answer: str = Field(
..., description="The generated completion from the RAG process"
)
# generated_answer: str = Field(
# ..., description="The generated completion from the RAG process"
# )
search_results: AggregateSearchResult = Field(
..., description="The search results used for the RAG process"
)
Expand All @@ -121,17 +121,11 @@ class RAGResponse(BaseModel):
default_factory=dict,
description="Additional data returned by the LLM provider",
)

# Provide a deprecated alias property.
@property
@deprecated(version="3.4.1", reason="Use 'generated_answer' instead")
def completion(self) -> str:
return self.generated_answer

@completion.setter
@deprecated(version="3.4.1", reason="Use 'generated_answer' instead")
def completion(self, value: str):
self.generated_answer = value
completion: str = Field(
...,
description="The generated completion from the RAG process",
deprecated=True,
)

class Config:
json_schema_extra = {
Expand Down

0 comments on commit 22adf3c

Please sign in to comment.