Closed
Description
I read through the blog at https://www.elastic.co/search-labs/blog/function-calling-with-elastic, and I found two functions defined in the notebook and blog are insconsistent:
- def get_index_mapping():
- get_ref_document()
The ones defined in the blogs are not correct:
def get_index_mapping():
url = f"""{ES_ENDPOINT}/{ES_INDEX}/_mappings"""
headers = {
"Content-type": "application/json",
"Authorization": f"""ApiKey {ES_API_KEY}""",
}
def get_index_mapping():
url = f"""{ES_ENDPOINT}/{ES_INDEX}/_mappings"""
headers = {
"Content-type": "application/json",
"Authorization": f"""ApiKey {ES_API_KEY}""",
}
resp = requests.request("GET", url, headers=headers)
resp = json.loads(resp.text)
mapping = json.dumps(resp, indent=4)
return mapping
Metadata
Metadata
Assignees
Labels
No labels