Skip to content

Commit

Permalink
Merge pull request #34 from SeisSerenata/main
Browse files Browse the repository at this point in the history
fix: update request body
  • Loading branch information
Cambio ML authored May 26, 2024
2 parents b2d3790 + e9cddfe commit 7573a26
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions any_parser/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
CAMBIO_PARSE_URL = (
"https://qreije6m7l.execute-api.us-west-2.amazonaws.com/v1/cambio_api/parse"
)
COMBIO_INSTRUCT_URL = (
CAMBIO_INSTRUCT_URL = (
"https://qreije6m7l.execute-api.us-west-2.amazonaws.com/v1/cambio_api/instruction"
)

Expand All @@ -21,7 +21,7 @@ def __init__(self, apiKey) -> None:
self._uploadurl = CAMBIO_UPLOAD_URL
self._extracturl = CAMBIO_EXTRACT_URL
self._parseurl = CAMBIO_PARSE_URL
self._instructurl = COMBIO_INSTRUCT_URL
self._instructurl = CAMBIO_INSTRUCT_URL
self._request_header = {"x-api-key": apiKey}

def setAPIKey(self, apiKey):
Expand Down Expand Up @@ -95,8 +95,7 @@ def _request_info_extraction(self, user_id, job_id, s3_key, mode, prompt=""):
"userId": user_id,
"jobId": job_id,
"fileKey": s3_key,
"user_prompt": prompt,
"use_textract": "True" if mode == "advanced" else "False",
"userPrompt": prompt,
}
response = requests.post(
self._parseurl, headers=self._request_header, json=payload
Expand All @@ -115,8 +114,7 @@ def _request_instruction_extraction(self, user_id, job_id, s3_key, mode, prompt=
"userId": user_id,
"jobId": job_id,
"fileKey": s3_key,
"user_prompt": prompt,
"use_textract": "True" if mode == "advanced" else "False",
"userPrompt": prompt,
}
response = requests.post(
self._instructurl, headers=self._request_header, json=payload
Expand Down

0 comments on commit 7573a26

Please sign in to comment.