Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in notebook Entity_Extraction_JSON.ipynb #200

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/json_capabilities/Entity_Extraction_JSON.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
},
"outputs": [],
"source": [
"entity_recongnition_text = \"John Johnson, the CEO of the Oil Inc. and Coal Inc. companies, has unveiled plans to build a new factory in Houston, Texas.\"\n",
"entity_recognition_text = \"John Johnson, the CEO of the Oil Inc. and Coal Inc. companies, has unveiled plans to build a new factory in Houston, Texas.\"\n",
"prompt = f\"\"\"\n",
"Generate list of entities in text based on the following Python class structure:\n",
"\n",
Expand All @@ -147,7 +147,7 @@
"class Entities(TypedDict):\n",
" entities: list[Entity]\n",
"\n",
"{entity_recongnition_text}\"\"\"\n",
"{entity_recognition_text}\"\"\"\n",
"model = genai.GenerativeModel(model_name='gemini-1.5-flash-latest', generation_config={\"temperature\": 0})\n",
"response = model.generate_content(prompt, generation_config={\"response_mime_type\": \"application/json\"})"
]
Expand Down Expand Up @@ -201,7 +201,7 @@
},
"source": [
"## Summary\n",
"You have used the Gemini API to extract entities of predifined categories with their labels. You extracted every person, company, state, and country. You are not limited to these categories, as this should work with any category of your choice.\n",
"You have used the Gemini API to extract entities of predefined categories with their labels. You extracted every person, company, state, and country. You are not limited to these categories, as this should work with any category of your choice.\n",
"\n",
"Please see the other notebooks in this directory to learn more about how you can use the Gemini API for other JSON related tasks.\n"
]
Expand Down
Loading