Skip to content

Commit

Permalink
Temporarily removes full_text from vector searches
Browse files Browse the repository at this point in the history
  • Loading branch information
bmquinn authored and mbklein committed Feb 6, 2024
1 parent e913cb3 commit e4b8efc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chat/src/event_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def _get_attributes(self):
attributes = [
item
for item in self._get_request_attributes()
if item not in [self._get_text_key(), "source"]
if item not in [self._get_text_key(), "source", "full_text"]
]
return attributes

Expand Down
8 changes: 6 additions & 2 deletions chat/src/handlers/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from event_config import EventConfig
from helpers.response import prepare_response


def handler(event, _context):
try:
config = EventConfig(event)
Expand All @@ -21,5 +20,10 @@ def handler(event, _context):
final_response = prepare_response(config)
config.socket.send(final_response)
return {"statusCode": 200}

except Exception as err:
raise err
if err.__class__.__name__ == "PayloadTooLargeException":
config.socket.send({"type": "error", "message": "Payload too large"})
return {"statusCode": 413, "body": "Payload too large"}
else:
raise err

0 comments on commit e4b8efc

Please sign in to comment.