diff --git a/app/Http/Resources/MessageResource.php b/app/Http/Resources/MessageResource.php index ed9de49..3229be7 100644 --- a/app/Http/Resources/MessageResource.php +++ b/app/Http/Resources/MessageResource.php @@ -24,7 +24,7 @@ public function toArray(Request $request): array 'meta_data' => MetaDataResource::collection($this->meta_data), 'tags' => TagResource::collection($this->tags), 'llm_functions' => LlmFunctionResource::collection($this->llm_functions), - 'children' => MessageResource::collection($this->children()->whereNotNull('content')->get()), + 'children' => MessageResource::collection($this->children()->whereNotNull('content')->where("role", "!=", 'function')->get()), 'created_at' => $this->created_at->diffForHumans(), 'created_at_formatted' => $this->created_at->diffForHumans(), 'tasks' => TaskResource::collection($this->tasks), diff --git a/tests/fixtures/prompts_before.json b/tests/fixtures/prompts_before.json index 2f27fd4..6ae994a 100644 --- a/tests/fixtures/prompts_before.json +++ b/tests/fixtures/prompts_before.json @@ -1,25 +1,19 @@ [ { "role": "system", - "content": "Acting as the users assistant and using the following meta data included in the question please answer their question,\n Current Date is 2023202320232023-02-09 07:09\n Only use the functions you have been provided with if needed to help the user with this question:### End Meta Data ### \n\n\n", + "content": "Acting as the users assistant and using the following meta data included in the question please answer their question,\n Current Date is 2023202320232023-04-09 11:09\n Only use the functions you have been provided with if needed to help the user with this question:### End Meta Data ### \n\n\n", "function": null, "name": null }, { "role": "user", - "content": "Get the content from this url then convert it to audio https:\/\/medium.com\/@alnutile\/suggestions-around-building-a-good-development-team-in-parallel-to-building-a-good-product-6dcc50b0a551\n\nand then make an image from the text \"House by the river\"", + "content": "subject: Jobs | Gun.io \n body: get content from the url https:\/\/app.gun.io\/ using the included functionhttps:\/\/app.gun.io\/\n\nI should try to look at this daily.", "function": null, "name": null }, - { - "role": "function", - "content": "https:\/\/oaidalleapiprodscus.blob.core.windows.net\/private\/org-ClL1biAi0m1pC2J2IV5C22TQ\/user-i08oJb4T3Lhnsh2yJsoErWJ4\/img-ijTeJHl4EUETLSCjFTNc0LXs.png?st=2023-09-02T18%3A27%3A27Z&se=2023-09-02T20%3A27%3A27Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image\/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2023-09-02T06%3A08%3A47Z&ske=2023-09-03T06%3A08%3A47Z&sks=b&skv=2021-08-06&sig=PP7VaTSuIxHzQXi%2B1EA3pDXPHpnRRvucmrWGBN4sc9I%3D", - "function": null, - "name": "text_to_image" - }, { "role": "assistant", - "content": "{\"name\":\"text_to_image\",\"content\":{\"text_for_image\":\"House by the river\"}}", + "content": "{\"name\":\"get_content_from_url\",\"content\":{\"url\":\"https:\\\/\\\/app.gun.io\\\/\"}}", "function": null, "name": null }, @@ -28,17 +22,5 @@ "content": "Perfection is Achieved Not When There Is Nothing More to Add, But When There Is Nothing Left to Take Away - Antoine de Saint-Exuper", "function": null, "name": "get_content_from_url" - }, - { - "role": "assistant", - "content": "{\"name\":\"get_content_from_url\",\"content\":{\"url\":\"https:\\\/\\\/medium.com\\\/@alnutile\\\/suggestions-around-building-a-good-development-team-in-parallel-to-building-a-good-product-6dcc50b0a551\"}}", - "function": null, - "name": null - }, - { - "role": "function", - "content": "https:\/\/s3.eu-central-1.amazonaws.com\/tts-download\/44e644bc33580c66bd33751beb941c54.wav?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZ3CYNLHHVKA7D7Z4%2F20230902%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20230902T185524Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=f196f78591584911a09543f775ad581918d5e6bbb55d49e94e051f98a7f82aaf", - "function": null, - "name": "content_to_voice" } ] \ No newline at end of file