Skip to content

Instantly share code, notes, and snippets.

@njhale
Created August 10, 2024 22:29
Show Gist options
  • Select an option

  • Save njhale/d23c01ef158fb340c82943e4050f9e1c to your computer and use it in GitHub Desktop.

Select an option

Save njhale/d23c01ef158fb340c82943e4050f9e1c to your computer and use it in GitHub Desktop.
{
"messages": [
{
"type": 1,
"message": "Great! How can I assist you today?"
},
{
"type": 2,
"message": "give me a haiku about how annoying typescript is"
},
{
"type": 1,
"message": "Sure, here's a haiku for you:\n\nTypescript's strict embrace,\nErrors in my face, I sigh—\nCode fights every line."
},
{
"type": 2,
"message": "search the internet for starfish"
},
{
"type": 1,
"message": "Starfish, also known as sea stars, are fascinating marine invertebrates belonging to the phylum Echinodermata and the class Asteroidea. Here are some interesting facts about them:\n\n### Physical Characteristics:\n- **Body Structure**: Typically, starfish have a central disc and five arms, though some species can have up to 50 arms.\n- **Size**: They range from 1 cm to 65 cm in diameter, with some species growing up to 3 feet.\n- **Weight**: They can weigh up to 5 kg.\n- **Skin**: Their skin is spiny and hard, providing protection against predators.\n\n### Habitat and Range:\n- **Habitat**: Starfish are found in various marine environments, including tidal pools, rocky shores, sea grass, kelp beds, coral reefs, and sandy seabeds as deep as 9,000 meters.\n- **Range**: They inhabit all the world's oceans, from tropical waters to the cold seafloor.\n\n### Diet and Feeding:\n- **Diet**: Starfish are carnivorous, primarily feeding on mollusks such as clams, oysters, and snails.\n- **Feeding Mechanism**: They have a unique feeding method where they extrude their stomachs out through their mouths to digest prey externally before retracting the stomach back into their bodies.\n\n### Lifespan and Reproduction:\n- **Lifespan**: In the wild, starfish can live up to 35 years.\n- **Regeneration**: They possess remarkable regenerative abilities, capable of regrowing lost arms, and in some cases, an entire new body from a single arm.\n\n### Defense Mechanisms:\n- **Camouflage**: Some species have colors that help them blend into their surroundings.\n- **Arm Shedding**: They can shed an arm to escape predators.\n- **Regeneration**: Lost or damaged limbs can be regrown.\n\n### Social Behavior:\n- **Solitary Nature**: Starfish are generally solitary but may gather in large groups during feeding times.\n\n### Predators:\n- **Natural Predators**: Include certain fish species, sharks, manta rays, sea turtles, snails, crabs, shrimp, otters, birds, and even other starfish.\n\nStarfish are an essential part of the marine ecosystem, contributing to the balance of marine life through their unique feeding habits and interactions with other sea creatures.\n\nFor more detailed information, you can visit the following sources:\n- [National Geographic Kids](https://www.natgeokids.com/uk/discover/animals/sea-life/starfish-facts/)\n- [National Aquarium](https://aqua.org/explore/animals/sea-stars)\n- [National Geographic](https://kids.nationalgeographic.com/animals/invertebrates/facts/sea-star)"
}
],
"chatState": "{\"continuation\":{\"state\":{\"completion\":{\"model\":\"gpt-4o\",\"internalSystemPrompt\":false,\"tools\":[{\"function\":{\"toolID\":\"https://raw.githubusercontent.com/gptscript-ai/answers-from-the-internet/b97e96a8b4e00d3aa08a7162d9658d6e21a1f897/tool.gpt:answers-from-the-internet\",\"name\":\"answersFromTheInternet\",\"description\":\"Uses Google to answer the provided question\",\"parameters\":{\"properties\":{\"question\":{\"description\":\"the question to ask\",\"type\":\"string\"}},\"type\":\"object\"}}}],\"messages\":[{\"role\":\"system\",\"content\":[{\"text\":\"You can execute tools to help answer a user's questions.\"}],\"usage\":{}},{\"role\":\"assistant\",\"content\":[{\"text\":\"Great! How can I assist you today?\"}],\"usage\":{}},{\"role\":\"user\",\"content\":[{\"text\":\"give me a haiku about how annoying typescript is\"}],\"usage\":{}},{\"role\":\"assistant\",\"content\":[{\"text\":\"Sure, here's a haiku for you:\\n\\nTypescript's strict embrace,\\nErrors in my face, I sigh—\\nCode fights every line.\"}],\"usage\":{}},{\"role\":\"user\",\"content\":[{\"text\":\"search the internet for starfish\"}],\"usage\":{}},{\"role\":\"assistant\",\"content\":[{\"toolCall\":{\"index\":0,\"id\":\"call_e9ajMVD2SMgnkyeSDz562f1D\",\"function\":{\"name\":\"answersFromTheInternet\",\"arguments\":\"{\\\"question\\\":\\\"starfish\\\"}\"}}}],\"usage\":{}},{\"role\":\"tool\",\"content\":[{\"text\":\"\\n> tool\\n> node --no-warnings --loader ts-node/esm src/server.ts\\n\\nslow page: https://www.natgeokids.com/uk/discover/animals/sea-life/starfish-facts/\\n### Sources:\\n- [National Geographic Kids](https://www.natgeokids.com/uk/discover/animals/sea-life/starfish-facts/)\\n- [National Aquarium](https://aqua.org/explore/animals/sea-stars)\\n- [National Geographic](https://kids.nationalgeographic.com/animals/invertebrates/facts/sea-star)\\n\\n### Answer:\\nStarfish, also known as sea stars, are fascinating marine invertebrates belonging to the phylum Echinodermata and the class Asteroidea. They are not actually fish, as they lack backbones, placing them in the invertebrate category along with sea urchins and sand dollars.\\n\\n#### Physical Characteristics:\\n- **Body Structure**: Typically, starfish have a central disc and five arms, though some species can have up to 50 arms.\\n- **Size**: They range from 1 cm to 65 cm in diameter, with some species growing up to 3 feet.\\n- **Weight**: They can weigh up to 5 kg.\\n- **Skin**: Their skin is spiny and hard, providing protection against predators.\\n\\n#### Habitat and Range:\\n- **Habitat**: Starfish are found in various marine environments, including tidal pools, rocky shores, sea grass, kelp beds, coral reefs, and sandy seabeds as deep as 9,000 meters.\\n- **Range**: They inhabit all the world's oceans, from tropical waters to the cold seafloor.\\n\\n#### Diet and Feeding:\\n- **Diet**: Starfish are carnivorous, primarily feeding on mollusks such as clams, oysters, and snails.\\n- **Feeding Mechanism**: They have a unique feeding method where they extrude their stomachs out through their mouths to digest prey externally before retracting the stomach back into their bodies.\\n\\n#### Lifespan and Reproduction:\\n- **Lifespan**: In the wild, starfish can live up to 35 years.\\n- **Regeneration**: They possess remarkable regenerative abilities, capable of regrowing lost arms, and in some cases, an entire new body from a single arm.\\n\\n#### Defense Mechanisms:\\n- **Camouflage**: Some species have colors that help them blend into their surroundings.\\n- **Arm Shedding**: They can shed an arm to escape predators.\\n- **Regeneration**: Lost or damaged limbs can be regrown.\\n\\n#### Social Behavior:\\n- **Solitary Nature**: Starfish are generally solitary but may gather in large groups during feeding times.\\n\\n#### Predators:\\n- **Natural Predators**: Include certain fish species, sharks, manta rays, sea turtles, snails, crabs, shrimp, otters, birds, and even other starfish.\\n\\nStarfish are an essential part of the marine ecosystem, contributing to the balance of marine life through their unique feeding habits and interactions with other sea creatures.\"}],\"toolCall\":{\"index\":0,\"id\":\"call_e9ajMVD2SMgnkyeSDz562f1D\",\"function\":{\"name\":\"answersFromTheInternet\",\"arguments\":\"{\\\"question\\\":\\\"starfish\\\"}\"}},\"usage\":{}},{\"role\":\"assistant\",\"content\":[{\"text\":\"Starfish, also known as sea stars, are fascinating marine invertebrates belonging to the phylum Echinodermata and the class Asteroidea. Here are some interesting facts about them:\\n\\n### Physical Characteristics:\\n- **Body Structure**: Typically, starfish have a central disc and five arms, though some species can have up to 50 arms.\\n- **Size**: They range from 1 cm to 65 cm in diameter, with some species growing up to 3 feet.\\n- **Weight**: They can weigh up to 5 kg.\\n- **Skin**: Their skin is spiny and hard, providing protection against predators.\\n\\n### Habitat and Range:\\n- **Habitat**: Starfish are found in various marine environments, including tidal pools, rocky shores, sea grass, kelp beds, coral reefs, and sandy seabeds as deep as 9,000 meters.\\n- **Range**: They inhabit all the world's oceans, from tropical waters to the cold seafloor.\\n\\n### Diet and Feeding:\\n- **Diet**: Starfish are carnivorous, primarily feeding on mollusks such as clams, oysters, and snails.\\n- **Feeding Mechanism**: They have a unique feeding method where they extrude their stomachs out through their mouths to digest prey externally before retracting the stomach back into their bodies.\\n\\n### Lifespan and Reproduction:\\n- **Lifespan**: In the wild, starfish can live up to 35 years.\\n- **Regeneration**: They possess remarkable regenerative abilities, capable of regrowing lost arms, and in some cases, an entire new body from a single arm.\\n\\n### Defense Mechanisms:\\n- **Camouflage**: Some species have colors that help them blend into their surroundings.\\n- **Arm Shedding**: They can shed an arm to escape predators.\\n- **Regeneration**: Lost or damaged limbs can be regrown.\\n\\n### Social Behavior:\\n- **Solitary Nature**: Starfish are generally solitary but may gather in large groups during feeding times.\\n\\n### Predators:\\n- **Natural Predators**: Include certain fish species, sharks, manta rays, sea turtles, snails, crabs, shrimp, otters, birds, and even other starfish.\\n\\nStarfish are an essential part of the marine ecosystem, contributing to the balance of marine life through their unique feeding habits and interactions with other sea creatures.\\n\\nFor more detailed information, you can visit the following sources:\\n- [National Geographic Kids](https://www.natgeokids.com/uk/discover/animals/sea-life/starfish-facts/)\\n- [National Aquarium](https://aqua.org/explore/animals/sea-stars)\\n- [National Geographic](https://kids.nationalgeographic.com/animals/invertebrates/facts/sea-star)\"}],\"usage\":{}}],\"chat\":true},\"results\":{\"call_e9ajMVD2SMgnkyeSDz562f1D\":{\"toolID\":\"https://raw.githubusercontent.com/gptscript-ai/answers-from-the-internet/b97e96a8b4e00d3aa08a7162d9658d6e21a1f897/tool.gpt:answers-from-the-internet\",\"callID\":\"call_e9ajMVD2SMgnkyeSDz562f1D\",\"result\":\"\\n> tool\\n> node --no-warnings --loader ts-node/esm src/server.ts\\n\\nslow page: https://www.natgeokids.com/uk/discover/animals/sea-life/starfish-facts/\\n### Sources:\\n- [National Geographic Kids](https://www.natgeokids.com/uk/discover/animals/sea-life/starfish-facts/)\\n- [National Aquarium](https://aqua.org/explore/animals/sea-stars)\\n- [National Geographic](https://kids.nationalgeographic.com/animals/invertebrates/facts/sea-star)\\n\\n### Answer:\\nStarfish, also known as sea stars, are fascinating marine invertebrates belonging to the phylum Echinodermata and the class Asteroidea. They are not actually fish, as they lack backbones, placing them in the invertebrate category along with sea urchins and sand dollars.\\n\\n#### Physical Characteristics:\\n- **Body Structure**: Typically, starfish have a central disc and five arms, though some species can have up to 50 arms.\\n- **Size**: They range from 1 cm to 65 cm in diameter, with some species growing up to 3 feet.\\n- **Weight**: They can weigh up to 5 kg.\\n- **Skin**: Their skin is spiny and hard, providing protection against predators.\\n\\n#### Habitat and Range:\\n- **Habitat**: Starfish are found in various marine environments, including tidal pools, rocky shores, sea grass, kelp beds, coral reefs, and sandy seabeds as deep as 9,000 meters.\\n- **Range**: They inhabit all the world's oceans, from tropical waters to the cold seafloor.\\n\\n#### Diet and Feeding:\\n- **Diet**: Starfish are carnivorous, primarily feeding on mollusks such as clams, oysters, and snails.\\n- **Feeding Mechanism**: They have a unique feeding method where they extrude their stomachs out through their mouths to digest prey externally before retracting the stomach back into their bodies.\\n\\n#### Lifespan and Reproduction:\\n- **Lifespan**: In the wild, starfish can live up to 35 years.\\n- **Regeneration**: They possess remarkable regenerative abilities, capable of regrowing lost arms, and in some cases, an entire new body from a single arm.\\n\\n#### Defense Mechanisms:\\n- **Camouflage**: Some species have colors that help them blend into their surroundings.\\n- **Arm Shedding**: They can shed an arm to escape predators.\\n- **Regeneration**: Lost or damaged limbs can be regrown.\\n\\n#### Social Behavior:\\n- **Solitary Nature**: Starfish are generally solitary but may gather in large groups during feeding times.\\n\\n#### Predators:\\n- **Natural Predators**: Include certain fish species, sharks, manta rays, sea turtles, snails, crabs, shrimp, otters, birds, and even other starfish.\\n\\nStarfish are an essential part of the marine ecosystem, contributing to the balance of marine life through their unique feeding habits and interactions with other sea creatures.\"}}},\"result\":\"Starfish, also known as sea stars, are fascinating marine invertebrates belonging to the phylum Echinodermata and the class Asteroidea. Here are some interesting facts about them:\\n\\n### Physical Characteristics:\\n- **Body Structure**: Typically, starfish have a central disc and five arms, though some species can have up to 50 arms.\\n- **Size**: They range from 1 cm to 65 cm in diameter, with some species growing up to 3 feet.\\n- **Weight**: They can weigh up to 5 kg.\\n- **Skin**: Their skin is spiny and hard, providing protection against predators.\\n\\n### Habitat and Range:\\n- **Habitat**: Starfish are found in various marine environments, including tidal pools, rocky shores, sea grass, kelp beds, coral reefs, and sandy seabeds as deep as 9,000 meters.\\n- **Range**: They inhabit all the world's oceans, from tropical waters to the cold seafloor.\\n\\n### Diet and Feeding:\\n- **Diet**: Starfish are carnivorous, primarily feeding on mollusks such as clams, oysters, and snails.\\n- **Feeding Mechanism**: They have a unique feeding method where they extrude their stomachs out through their mouths to digest prey externally before retracting the stomach back into their bodies.\\n\\n### Lifespan and Reproduction:\\n- **Lifespan**: In the wild, starfish can live up to 35 years.\\n- **Regeneration**: They possess remarkable regenerative abilities, capable of regrowing lost arms, and in some cases, an entire new body from a single arm.\\n\\n### Defense Mechanisms:\\n- **Camouflage**: Some species have colors that help them blend into their surroundings.\\n- **Arm Shedding**: They can shed an arm to escape predators.\\n- **Regeneration**: Lost or damaged limbs can be regrown.\\n\\n### Social Behavior:\\n- **Solitary Nature**: Starfish are generally solitary but may gather in large groups during feeding times.\\n\\n### Predators:\\n- **Natural Predators**: Include certain fish species, sharks, manta rays, sea turtles, snails, crabs, shrimp, otters, birds, and even other starfish.\\n\\nStarfish are an essential part of the marine ecosystem, contributing to the balance of marine life through their unique feeding habits and interactions with other sea creatures.\\n\\nFor more detailed information, you can visit the following sources:\\n- [National Geographic Kids](https://www.natgeokids.com/uk/discover/animals/sea-life/starfish-facts/)\\n- [National Aquarium](https://aqua.org/explore/animals/sea-stars)\\n- [National Geographic](https://kids.nationalgeographic.com/animals/invertebrates/facts/sea-star)\"},\"continuationToolID\":\"inline:Oh Donnie\"}",
"tools": [
"github.com/gptscript-ai/answers-from-the-internet"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment