Skip to content

Commit

Permalink
Trigger railway deploy (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
KastanDay authored Mar 13, 2024
1 parent 3b6a6ea commit 9d77ab2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ai_ta_backend/beam/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,13 +751,12 @@ def _ingest_single_txt(self, s3_path: str, course_name: str, **kwargs) -> str:
Returns:
str: "Success" or an error message
"""
print("In text ingest")
print("In text ingest, UTF-8")
try:
# NOTE: slightly different method for .txt files, no need for download. It's part of the 'body'
response = self.s3_client.get_object(Bucket=os.environ['S3_BUCKET_NAME'], Key=s3_path)
print("s3 Resonse:", response)
text = response['Body'].read().decode('utf-8')
print("Text from s3:", text)
print("UTF-8 text to ignest (from s3)", text)
text = [text]

metadatas: List[Dict[str, Any]] = [{
Expand Down

0 comments on commit 9d77ab2

Please sign in to comment.