Skip to content

Commit

Permalink
CV2-2875 tweak response structure
Browse files Browse the repository at this point in the history
  • Loading branch information
DGaffney committed Nov 3, 2023
1 parent 17d0357 commit 8a32cdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model/generic_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def respond(self, docs: Union[List[schemas.Message], schemas.Message]) -> List[s
vectorizable_texts = [e.body.text for e in docs]
vectorized = self.vectorize(vectorizable_texts)
for doc, vector in zip(docs, vectorized):
doc.response = vector
doc.hash_value = vector
return docs

def vectorize(self, texts: List[str]) -> List[List[float]]:
Expand Down
1 change: 1 addition & 0 deletions lib/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class TextOutput(BaseModel):
id: str
callback_url: str
text: str
hash_value: HashValue

class VideoInput(BaseModel):
id: str
Expand Down

0 comments on commit 8a32cdf

Please sign in to comment.