diff --git a/site/en/gemini-api/tutorials/extract_structured_data.ipynb b/site/en/gemini-api/tutorials/extract_structured_data.ipynb index 214dcbca3..3b155a210 100644 --- a/site/en/gemini-api/tutorials/extract_structured_data.ipynb +++ b/site/en/gemini-api/tutorials/extract_structured_data.ipynb @@ -90,12 +90,13 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 1, "metadata": { "id": "TS9l5igubpHO" }, "outputs": [], "source": [ + "import json\n", "import pathlib\n", "import textwrap\n", "\n", @@ -127,7 +128,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 2, "metadata": { "id": "ab9ASynfcIZn" }, @@ -139,11 +140,9 @@ "\n", " # Or use `os.getenv('API_KEY')` to fetch an environment variable.\n", " GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n", + " genai.configure(api_key=GOOGLE_API_KEY)\n", "except ImportError:\n", - " import os\n", - " GOOGLE_API_KEY = os.environ['GOOGLE_API_KEY']\n", - "\n", - "genai.configure(api_key=GOOGLE_API_KEY)" + " pass\n" ] }, { @@ -160,7 +159,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 3, "metadata": { "id": "0THz95wOL4pL" }, @@ -184,7 +183,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 4, "metadata": { "id": "yMnxJqubg759" }, @@ -226,7 +225,7 @@ "" ] }, - "execution_count": 6, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -255,7 +254,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 5, "metadata": { "id": "eStTMD6VL4pM" }, @@ -288,21 +287,18 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 6, "metadata": { "id": "B0b5zHI3uEBm" }, "outputs": [ { "data": { - "application/vnd.google.colaboratory.intrinsic+json": { - "type": "string" - }, "text/plain": [ - "'{\"people\": [\\n {\\n \"name\": \"Anya\",\\n \"description\": \"A young girl who lives in the town of Willow Creek with her parents, Elise and Edward. She possesses a magical backpack that was handed down to her from her grandmother.\",\\n \"start_place_name\": \"Willow Creek\",\\n \"end_place_name\": \"Willow Creek\"\\n },\\n {\\n \"name\": \"Elise\",\\n \"description\": \"Anya\\'s kind-hearted mother\",\\n \"start_place_name\": \"Willow Creek\",\\n \"end_place_name\": \"Willow Creek\"\\n },\\n {\\n \"name\": \"Edward\",\\n \"description\": \"Anya\\'s wise-bearded father\",\\n \"start_place_name\": \"Willow Creek\",\\n \"end_place_name\": \"Willow Creek\"\\n },\\n {\\n \"name\": \"Samuel\",\\n \"description\": \"Anya\\'s best friend, a curious and adventurous boy with a mischievous grin.\",\\n \"start_place_name\": \"Willow Creek\",\\n \"end_place_name\": \"Willow Creek\"\\n },\\n {\\n \"name\": \"Monster\",\\n \"description\": \"A massive beast with sharp teeth, glowing red eyes, and claws that could crush a human with ease.\",\\n \"start_place_name\": \"Forest\",\\n \"end_place_name\": \"Forest\"\\n }\\n], \"places\": [\\n {\\n \"name\": \"Willow Creek\",\\n \"description\": \"A quaint town nestled amidst rolling hills and whispering willows.\"\\n },\\n {\\n \"name\": \"Forest\",\\n \"description\": \"A shadowy place with rustling undergrowth and whispering trees.\"\\n },\\n {\\n \"name\": \"Schoolhouse\",\\n \"description\": \"The only school in the town of Willow Creek.\"\\n },\\n {\\n \"name\": \"Anya\\'s home\",\\n \"description\": \"A modest cottage with a creaky wooden door.\"\\n }\\n], \"things\": [\\n {\\n \"name\": \"Magic backpack\",\\n \"description\": \"A magical backpack that was handed down to Anya from her grandmother. Its soft, emerald-green fabric shimmered with an ethereal glow, and its leather straps held secrets that only Anya knew.\",\\n \"start_place_name\": \"Anya\\'s home\",\\n \"end_place_name\": \"Forest\"\\n },\\n {\\n \"name\": \"Shimmering sword\",\\n \"description\": \"A sword that shimmered in the sunlight and could strike with blinding light.\",\\n \"start_place_name\": \"Magic backpack\",\\n \"end_place_name\": \"Forest\"\\n },\\n {\\n \"name\": \"Book of ancient spells\",\\n \"description\": \"A book that contained ancient spells.\",\\n \"start_place_name\": \"Magic backpack\",\\n \"end_place_name\": \"Forest\"\\n },\\n {\\n \"name\": \"Tiny compass\",\\n \"description\": \"A compass that always pointed north.\",\\n \"start_place_name\": \"Magic backpack\",\\n \"end_place_name\": \"Forest\"\\n },\\n {\\n \"name\": \"Magical key\",\\n \"description\": \"A key that could open any lock.\",\\n \"start_place_name\": \"Magic backpack\",\\n \"end_place_name\": \"Forest\"\\n },\\n {\\n \"name\": \"Shattered crystals\",\\n \"description\": \"The remains of the monster after it was defeated by Anya\\'s magic backpack.\",\\n \"start_place_name\": \"Forest\",\\n \"end_place_name\": \"Forest\"\\n }\\n], \"relationships\": [\\n {\\n \"person_1_name\": \"Anya\",\\n \"person_2_name\": \"Elise\",\\n \"relationship\": \"mother-daughter\"\\n },\\n {\\n \"person_1_name\": \"Anya\",\\n \"person_2_name\": \"Edward\",\\n \"relationship\": \"father-daughter\"\\n },\\n {\\n \"person_1_name\": \"Anya\",\\n \"person_2_name\": \"Samuel\",\\n \"relationship\": \"best friends\"\\n }\\n]}'" + "'{\"people\":[{\"name\":\"Anya\",\"description\":\"A young girl with a magical backpack\",\"start_place_name\":\"Willow Creek\",\"end_place_name\":\"Willow Creek\"},{\"name\":\"Elise\",\"description\":\"Anya\\'s kind-hearted mother\",\"start_place_name\":\"Willow Creek\",\"end_place_name\":\"Willow Creek\"},{\"name\":\"Edward\",\"description\":\"Anya\\'s wise-bearded father\",\"start_place_name\":\"Willow Creek\",\"end_place_name\":\"Willow Creek\"},{\"name\":\"Samuel\",\"description\":\"Anya\\'s curious and adventurous best friend\",\"start_place_name\":\"Willow Creek\",\"end_place_name\":\"Willow Creek\"}],\"places\":[{\"name\":\"Willow Creek\",\"description\":\"A quaint town nestled amidst rolling hills and whispering willows\"},{\"name\":\"Anya\\'s cottage\",\"description\":\"A modest cottage in Willow Creek\"},{\"name\":\"Schoolhouse\",\"description\":\"The only schoolhouse in Willow Creek\"},{\"name\":\"Forest\",\"description\":\"A shadowy forest near Willow Creek\"}],\"things\":[{\"name\":\"Magical backpack\",\"description\":\"A shimmering emerald-green backpack with enchanted contents\",\"start_place_name\":\"Anya\\'s cottage\",\"end_place_name\":\"Forest\"},{\"name\":\"Shimmering sword\",\"description\":\"A sword found inside the backpack\",\"start_place_name\":\"Anya\\'s cottage\",\"end_place_name\":\"Forest\"},{\"name\":\"Book of ancient spells\",\"description\":\"A book found inside the backpack\",\"start_place_name\":\"Anya\\'s cottage\",\"end_place_name\":\"Forest\"},{\"name\":\"Tiny compass\",\"description\":\"A compass found inside the backpack\",\"start_place_name\":\"Anya\\'s cottage\",\"end_place_name\":\"Forest\"},{\"name\":\"Magical key\",\"description\":\"A key found inside the backpack\",\"start_place_name\":\"Anya\\'s cottage\",\"end_place_name\":\"Forest\"}],\"relationships\":[{\"person_1_name\":\"Anya\",\"person_2_name\":\"Elise\",\"relationship\":\"Mother-daughter\"},{\"person_1_name\":\"Anya\",\"person_2_name\":\"Edward\",\"relationship\":\"Father-daughter\"},{\"person_1_name\":\"Anya\",\"person_2_name\":\"Samuel\",\"relationship\":\"Best friends\"}]}\\n'" ] }, - "execution_count": 8, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -322,7 +318,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 7, "metadata": { "id": "xSdj50czL4pM" }, @@ -335,7 +331,7 @@ " \"people\": [\n", " {\n", " \"name\": \"Anya\",\n", - " \"description\": \"A young girl who lives in the town of Willow Creek with her parents, Elise and Edward. She possesses a magical backpack that was handed down to her from her grandmother.\",\n", + " \"description\": \"A young girl with a magical backpack\",\n", " \"start_place_name\": \"Willow Creek\",\n", " \"end_place_name\": \"Willow Creek\"\n", " },\n", @@ -353,70 +349,58 @@ " },\n", " {\n", " \"name\": \"Samuel\",\n", - " \"description\": \"Anya's best friend, a curious and adventurous boy with a mischievous grin.\",\n", + " \"description\": \"Anya's curious and adventurous best friend\",\n", " \"start_place_name\": \"Willow Creek\",\n", " \"end_place_name\": \"Willow Creek\"\n", - " },\n", - " {\n", - " \"name\": \"Monster\",\n", - " \"description\": \"A massive beast with sharp teeth, glowing red eyes, and claws that could crush a human with ease.\",\n", - " \"start_place_name\": \"Forest\",\n", - " \"end_place_name\": \"Forest\"\n", " }\n", " ],\n", " \"places\": [\n", " {\n", " \"name\": \"Willow Creek\",\n", - " \"description\": \"A quaint town nestled amidst rolling hills and whispering willows.\"\n", + " \"description\": \"A quaint town nestled amidst rolling hills and whispering willows\"\n", " },\n", " {\n", - " \"name\": \"Forest\",\n", - " \"description\": \"A shadowy place with rustling undergrowth and whispering trees.\"\n", + " \"name\": \"Anya's cottage\",\n", + " \"description\": \"A modest cottage in Willow Creek\"\n", " },\n", " {\n", " \"name\": \"Schoolhouse\",\n", - " \"description\": \"The only school in the town of Willow Creek.\"\n", + " \"description\": \"The only schoolhouse in Willow Creek\"\n", " },\n", " {\n", - " \"name\": \"Anya's home\",\n", - " \"description\": \"A modest cottage with a creaky wooden door.\"\n", + " \"name\": \"Forest\",\n", + " \"description\": \"A shadowy forest near Willow Creek\"\n", " }\n", " ],\n", " \"things\": [\n", " {\n", - " \"name\": \"Magic backpack\",\n", - " \"description\": \"A magical backpack that was handed down to Anya from her grandmother. Its soft, emerald-green fabric shimmered with an ethereal glow, and its leather straps held secrets that only Anya knew.\",\n", - " \"start_place_name\": \"Anya's home\",\n", + " \"name\": \"Magical backpack\",\n", + " \"description\": \"A shimmering emerald-green backpack with enchanted contents\",\n", + " \"start_place_name\": \"Anya's cottage\",\n", " \"end_place_name\": \"Forest\"\n", " },\n", " {\n", " \"name\": \"Shimmering sword\",\n", - " \"description\": \"A sword that shimmered in the sunlight and could strike with blinding light.\",\n", - " \"start_place_name\": \"Magic backpack\",\n", + " \"description\": \"A sword found inside the backpack\",\n", + " \"start_place_name\": \"Anya's cottage\",\n", " \"end_place_name\": \"Forest\"\n", " },\n", " {\n", " \"name\": \"Book of ancient spells\",\n", - " \"description\": \"A book that contained ancient spells.\",\n", - " \"start_place_name\": \"Magic backpack\",\n", + " \"description\": \"A book found inside the backpack\",\n", + " \"start_place_name\": \"Anya's cottage\",\n", " \"end_place_name\": \"Forest\"\n", " },\n", " {\n", " \"name\": \"Tiny compass\",\n", - " \"description\": \"A compass that always pointed north.\",\n", - " \"start_place_name\": \"Magic backpack\",\n", + " \"description\": \"A compass found inside the backpack\",\n", + " \"start_place_name\": \"Anya's cottage\",\n", " \"end_place_name\": \"Forest\"\n", " },\n", " {\n", " \"name\": \"Magical key\",\n", - " \"description\": \"A key that could open any lock.\",\n", - " \"start_place_name\": \"Magic backpack\",\n", - " \"end_place_name\": \"Forest\"\n", - " },\n", - " {\n", - " \"name\": \"Shattered crystals\",\n", - " \"description\": \"The remains of the monster after it was defeated by Anya's magic backpack.\",\n", - " \"start_place_name\": \"Forest\",\n", + " \"description\": \"A key found inside the backpack\",\n", + " \"start_place_name\": \"Anya's cottage\",\n", " \"end_place_name\": \"Forest\"\n", " }\n", " ],\n", @@ -424,17 +408,17 @@ " {\n", " \"person_1_name\": \"Anya\",\n", " \"person_2_name\": \"Elise\",\n", - " \"relationship\": \"mother-daughter\"\n", + " \"relationship\": \"Mother-daughter\"\n", " },\n", " {\n", " \"person_1_name\": \"Anya\",\n", " \"person_2_name\": \"Edward\",\n", - " \"relationship\": \"father-daughter\"\n", + " \"relationship\": \"Father-daughter\"\n", " },\n", " {\n", " \"person_1_name\": \"Anya\",\n", " \"person_2_name\": \"Samuel\",\n", - " \"relationship\": \"best friends\"\n", + " \"relationship\": \"Best friends\"\n", " }\n", " ]\n", "}\n" @@ -442,8 +426,6 @@ } ], "source": [ - "import json\n", - "\n", "print(json.dumps(json.loads(response.text), indent=4))" ] }, @@ -489,45 +471,28 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 8, "metadata": { - "id": "p2efqZA7BAzp" + "id": "d6293fed386a" }, "outputs": [], "source": [ - "person = glm.Schema(\n", - " type = glm.Type.OBJECT,\n", - " properties = {\n", - " 'name': glm.Schema(type=glm.Type.STRING),\n", - " 'description': glm.Schema(type=glm.Type.STRING),\n", - " 'start_place_name': glm.Schema(type=glm.Type.STRING),\n", - " 'end_place_name': glm.Schema(type=glm.Type.STRING)\n", - " },\n", - " required=['name', 'description', 'start_place_name', 'end_place_name']\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "HGV1wxx6BCJl" - }, - "source": [ - "Then define people as an `ARRAY` of `person` objects:" + "from typing_extensions import TypedDict" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 9, "metadata": { - "id": "Ur7kzpiA_Dqw" + "id": "e48ace2a3ded" }, "outputs": [], "source": [ - "people = glm.Schema(\n", - " type=glm.Type.ARRAY,\n", - " items=person\n", - ")" + "class Person(TypedDict):\n", + " name: str\n", + " description: str\n", + " start_place_name: str\n", + " end_place_name: str" ] }, { @@ -541,69 +506,43 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 10, "metadata": { "id": "7wd3jTqj_bVi" }, "outputs": [], "source": [ - "place = glm.Schema(\n", - " type = glm.Type.OBJECT,\n", - " properties = {\n", - " 'name': glm.Schema(type=glm.Type.STRING),\n", - " 'description': glm.Schema(type=glm.Type.STRING),\n", - " }\n", - ")\n", - "\n", - "places = glm.Schema(\n", - " type=glm.Type.ARRAY,\n", - " items=place\n", - ")" + "class Place(TypedDict):\n", + " name:str\n", + " description:str" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 11, "metadata": { "id": "45cLwvCd_vg_" }, "outputs": [], "source": [ - "thing = glm.Schema(\n", - " type = glm.Type.OBJECT,\n", - " properties = {\n", - " 'name': glm.Schema(type=glm.Type.STRING),\n", - " 'description': glm.Schema(type=glm.Type.STRING),\n", - " }\n", - ")\n", - "\n", - "things = glm.Schema(\n", - " type=glm.Type.ARRAY,\n", - " items=thing\n", - ")" + "class Thing(TypedDict):\n", + " name:str\n", + " description:str\n", + " " ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 12, "metadata": { "id": "8DdVSZJfADDY" }, "outputs": [], "source": [ - "relationship = glm.Schema(\n", - " type = glm.Type.OBJECT,\n", - " properties = {\n", - " 'person_1_name': glm.Schema(type=glm.Type.STRING),\n", - " 'person_2_name': glm.Schema(type=glm.Type.STRING),\n", - " 'relationship': glm.Schema(type=glm.Type.STRING),\n", - " }\n", - ")\n", - "\n", - "relationships = glm.Schema(\n", - " type=glm.Type.ARRAY,\n", - " items=relationship\n", - ")" + "class Relationship(TypedDict):\n", + " person_1_name: str\n", + " person_2_name: str\n", + " relationship: str" ] }, { @@ -617,27 +556,19 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 13, "metadata": { - "id": "YQkiVCtsPbUy" + "id": "b1fe9734d8c3" }, "outputs": [], "source": [ - "add_to_database = glm.FunctionDeclaration(\n", - " name=\"add_to_database\",\n", - " description=textwrap.dedent(\"\"\"\\\n", - " Adds entities to the database.\n", - " \"\"\"),\n", - " parameters=glm.Schema(\n", - " type=glm.Type.OBJECT,\n", - " properties = {\n", - " 'people': people,\n", - " 'places': places,\n", - " 'things': things,\n", - " 'relationships': relationships\n", - " }\n", - " )\n", - ")" + "def add_to_database(\n", + " people: list[Person],\n", + " places: list[Place],\n", + " things: list[Thing],\n", + " relationships: list[Relationship]\n", + "):\n", + " pass" ] }, { @@ -653,13 +584,13 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 14, "metadata": { "id": "5PGAPRDJP4Qx" }, "outputs": [], "source": [ - "model = model = genai.GenerativeModel(\n", + "model = genai.GenerativeModel(\n", " model_name='models/gemini-1.5-pro-latest',\n", " tools = [add_to_database])" ] @@ -682,12 +613,13 @@ "outputs": [], "source": [ "result = model.generate_content(f\"\"\"\n", - "Please add the people, places, things, and relationships from this story to the database:\n", - "\n", "{story}\n", + "\n", + "Please add the people, places, things, and relationships from this story to the database:\n", "\"\"\",\n", "# Force a function call\n", - "tool_config={'function_calling_config':'ANY'})" + "# tool_config={'function_calling_config':'ANY'}\n", + ")" ] }, { @@ -786,83 +718,67 @@ "{\n", " \"name\": \"add_to_database\",\n", " \"args\": {\n", - " \"things\": [\n", - " {\n", - " \"name\": \"Magical Backpack\",\n", - " \"description\": \"Anya's prized possession, the Magical Backpack, is no ordinary satchel. Its soft, emerald-green fabric shimmers with an ethereal glow, and its leather straps have secrets that only Anya knows. Within its capacious interior lay an enchanted world, filled with wonders that would ignite her imagination and change her life forever.\"\n", - " },\n", + " \"people\": [\n", " {\n", - " \"name\": \"Shimmering Sword\",\n", - " \"description\": \"Among the wonders in Anya's Magical Backpack, lies a shimmering sword. With a determined gleam in her eye, she retrieved the shimmering sword and charged towards the monster.\"\n", + " \"description\": \"A young girl with a magical backpack.\",\n", + " \"name\": \"Anya\"\n", " },\n", " {\n", - " \"description\": \"Residing within the Magical Backpack, the Book of Ancient Spells holds secrets untold.\",\n", - " \"name\": \"Book of Ancient Spells\"\n", + " \"description\": \"Anya\\\\'s kind-hearted mother.\",\n", + " \"name\": \"Elise\"\n", " },\n", " {\n", - " \"description\": \"Tucked away in the Magical Backpack is a tiny compass that always points north.\",\n", - " \"name\": \"Tiny Compass that Always Points North\"\n", + " \"description\": \"Anya\\\\'s wise-bearded father.\",\n", + " \"name\": \"Edward\"\n", " },\n", " {\n", - " \"description\": \"Hidden within the Magical Backpack is a magical key that can open any lock.\",\n", - " \"name\": \"Magical Key that Can Open Any Lock\"\n", + " \"description\": \"Anya\\\\'s curious and adventurous best friend.\",\n", + " \"name\": \"Samuel\"\n", " }\n", " ],\n", - " \"relationships\": [\n", - " {\n", - " \"relationship\": \"Mother-Daughter\",\n", - " \"person_1_name\": \"Anya\",\n", - " \"person_2_name\": \"Elise\"\n", - " },\n", + " \"things\": [\n", " {\n", - " \"person_2_name\": \"Edward\",\n", - " \"relationship\": \"Father-Daughter\",\n", - " \"person_1_name\": \"Anya\"\n", + " \"description\": \"A backpack with magical contents, including a shimmering sword, a book of ancient spells, a tiny compass, and a magical key.\",\n", + " \"name\": \"Magical backpack\"\n", " },\n", " {\n", - " \"person_2_name\": \"Samuel\",\n", - " \"person_1_name\": \"Anya\",\n", - " \"relationship\": \"Best Friends\"\n", + " \"description\": \"A sword that emits a blinding light when it strikes.\",\n", + " \"name\": \"Shimmering sword\"\n", " }\n", " ],\n", - " \"people\": [\n", + " \"places\": [\n", " {\n", - " \"name\": \"Anya\",\n", - " \"description\": \"Anya, the main character of the story, is a young girl with a magical backpack.\",\n", - " \"start_place_name\": \"Willow Creek\",\n", - " \"end_place_name\": \"Unknown\"\n", + " \"description\": \"A quaint town nestled amidst rolling hills and whispering willows.\",\n", + " \"name\": \"Willow Creek\"\n", " },\n", " {\n", - " \"name\": \"Elise\",\n", - " \"description\": \"Anya's mother, Elise is a kind-hearted woman.\",\n", - " \"end_place_name\": \"Unknown\",\n", - " \"start_place_name\": \"Willow Creek\"\n", + " \"description\": \"A modest cottage in Willow Creek.\",\n", + " \"name\": \"Anya\\\\'s cottage\"\n", " },\n", " {\n", - " \"start_place_name\": \"Willow Creek\",\n", - " \"end_place_name\": \"Unknown\",\n", - " \"name\": \"Edward\",\n", - " \"description\": \"Anya's father, Edward is a wise-bearded man.\"\n", + " \"description\": \"The town\\\\'s only schoolhouse.\",\n", + " \"name\": \"Schoolhouse\"\n", " },\n", " {\n", - " \"end_place_name\": \"Unknown\",\n", - " \"start_place_name\": \"Willow Creek\",\n", - " \"description\": \"Anya's best friend, Samuel is a curious and adventurous boy with a mischievous grin.\",\n", - " \"name\": \"Samuel\"\n", + " \"description\": \"A shadowy forest near Willow Creek where the monster lived.\",\n", + " \"name\": \"Forest\"\n", " }\n", " ],\n", - " \"places\": [\n", + " \"relationships\": [\n", " {\n", - " \"description\": \"The quaint town of Willow Creek is nestled amidst rolling hills and whispering willows.\",\n", - " \"name\": \"Willow Creek\"\n", + " \"person_1_name\": \"Anya\",\n", + " \"person_2_name\": \"Elise\",\n", + " \"relationship\": \"daughter\"\n", " },\n", " {\n", - " \"description\": \"The town's only schoolhouse.\",\n", - " \"name\": \"Schoolhouse\"\n", + " \"person_1_name\": \"Anya\",\n", + " \"person_2_name\": \"Edward\",\n", + " \"relationship\": \"daughter\"\n", " },\n", " {\n", - " \"description\": \"A shadowy place filled with secrets and dangers, the Forest is home to a terrifying monster.\",\n", - " \"name\": \"Forest\"\n", + " \"person_1_name\": \"Anya\",\n", + " \"person_2_name\": \"Samuel\",\n", + " \"relationship\": \"friend\"\n", " }\n", " ]\n", " }\n",