From c6299b0f0caa8ac5f2b7d5937858b6913037584f Mon Sep 17 00:00:00 2001 From: Alfred Nutile Date: Sun, 4 Aug 2024 16:42:12 -0400 Subject: [PATCH] Ah the job of huge commits --- .../app/Functions/SummarizeCollection.php | 27 +- Modules/LlmDriver/app/OllamaClient.php | 4 + ...st.php => RetrieveRelatedChatRepoTest.php} | 0 ...marizeTest.php => RetrieveRelatedTest.php} | 0 ...mpleRetrieveRelatedOrchestrateJobTest.php} | 0 tests/Feature/SummarizeCollectionTest.php | 43 +-- .../messages_before_final_job_claude.json | 36 +-- tests/fixtures/ollama_chat_payload.json | 77 ++--- .../ollama_chat_payload_before_remap.json | 74 +++++ tests/fixtures/ollama_chat_response.json | 18 +- .../fixtures/summarize_collection_prompt.txt | 282 ++++++++++++++++++ .../summarize_collection_response.json | 9 + .../tool_complete_response_claude.json | 6 +- 13 files changed, 446 insertions(+), 130 deletions(-) rename tests/Feature/{SearchAndSummarizeChatRepoTest.php => RetrieveRelatedChatRepoTest.php} (100%) rename tests/Feature/{SearchAndSummarizeTest.php => RetrieveRelatedTest.php} (100%) rename tests/Feature/{SimpleSearchAndSummarizeOrchestrateJobTest.php => SimpleRetrieveRelatedOrchestrateJobTest.php} (100%) create mode 100644 tests/fixtures/ollama_chat_payload_before_remap.json create mode 100644 tests/fixtures/summarize_collection_prompt.txt create mode 100644 tests/fixtures/summarize_collection_response.json diff --git a/Modules/LlmDriver/app/Functions/SummarizeCollection.php b/Modules/LlmDriver/app/Functions/SummarizeCollection.php index 5c1ffbe6..4c2fe3bc 100644 --- a/Modules/LlmDriver/app/Functions/SummarizeCollection.php +++ b/Modules/LlmDriver/app/Functions/SummarizeCollection.php @@ -3,10 +3,9 @@ namespace LlmLaraHub\LlmDriver\Functions; use App\Models\Message; +use Facades\App\Domains\Tokenizer\Templatizer; use Illuminate\Support\Facades\Log; use LlmLaraHub\LlmDriver\LlmDriverFacade; -use LlmLaraHub\LlmDriver\Prompts\SummarizeCollectionPrompt; -use LlmLaraHub\LlmDriver\Requests\MessageInDto; use LlmLaraHub\LlmDriver\Responses\FunctionResponse; class SummarizeCollection extends FunctionContract @@ -41,25 +40,27 @@ public function handle( 'token_count_v1' => token_counter($summary), ]); - $prompt = SummarizeCollectionPrompt::prompt($summary, $message->getContent()); + $content = $message->getContent(); - $messagesArray = []; - - $messagesArray[] = MessageInDto::from([ - 'content' => $prompt, - 'role' => 'user', - ]); + $prompt = Templatizer::appendContext(true) + ->handle( + content: $content, + replacement: $summary, + ); + /** + * @NOTE + * I treat chat like completion + * just same results + */ $results = LlmDriverFacade::driver($message->getDriver()) ->setToolType(ToolTypes::NoFunction) - ->chat($messagesArray); - - $this->response = $results->content; + ->completion($prompt); notify_ui($message->getChat(), 'Summary complete'); return FunctionResponse::from([ - 'content' => $this->response, + 'content' => $results->content, 'prompt' => $prompt, 'requires_followup' => true, 'documentChunks' => collect([]), diff --git a/Modules/LlmDriver/app/OllamaClient.php b/Modules/LlmDriver/app/OllamaClient.php index 241c3b61..15103748 100644 --- a/Modules/LlmDriver/app/OllamaClient.php +++ b/Modules/LlmDriver/app/OllamaClient.php @@ -96,8 +96,12 @@ public function chat(array $messages): CompletionResponse { Log::info('LlmDriver::OllamaClient::chat'); + put_fixture('ollama_chat_payload_before_remap.json', $messages); + $messages = $this->remapMessages($messages); + put_fixture('ollama_chat_payload.json', $messages); + $payload = [ 'model' => $this->getConfig('ollama')['models']['completion_model'], 'messages' => $messages, diff --git a/tests/Feature/SearchAndSummarizeChatRepoTest.php b/tests/Feature/RetrieveRelatedChatRepoTest.php similarity index 100% rename from tests/Feature/SearchAndSummarizeChatRepoTest.php rename to tests/Feature/RetrieveRelatedChatRepoTest.php diff --git a/tests/Feature/SearchAndSummarizeTest.php b/tests/Feature/RetrieveRelatedTest.php similarity index 100% rename from tests/Feature/SearchAndSummarizeTest.php rename to tests/Feature/RetrieveRelatedTest.php diff --git a/tests/Feature/SimpleSearchAndSummarizeOrchestrateJobTest.php b/tests/Feature/SimpleRetrieveRelatedOrchestrateJobTest.php similarity index 100% rename from tests/Feature/SimpleSearchAndSummarizeOrchestrateJobTest.php rename to tests/Feature/SimpleRetrieveRelatedOrchestrateJobTest.php diff --git a/tests/Feature/SummarizeCollectionTest.php b/tests/Feature/SummarizeCollectionTest.php index 494ded72..69abc84d 100644 --- a/tests/Feature/SummarizeCollectionTest.php +++ b/tests/Feature/SummarizeCollectionTest.php @@ -2,16 +2,12 @@ namespace Tests\Feature; -use App\Domains\Agents\VerifyPromptOutputDto; use App\Models\Collection; -use App\Models\DocumentChunk; use App\Models\Message; -use Facades\App\Domains\Agents\VerifyResponseAgent; use LlmLaraHub\LlmDriver\Functions\ParametersDto; use LlmLaraHub\LlmDriver\Functions\PropertyDto; use LlmLaraHub\LlmDriver\Functions\SummarizeCollection; use LlmLaraHub\LlmDriver\LlmDriverFacade; -use LlmLaraHub\LlmDriver\Requests\MessageInDto; use LlmLaraHub\LlmDriver\Responses\CompletionResponse; use Tests\TestCase; @@ -35,18 +31,10 @@ public function test_can_generate_function_as_array(): void public function test_gathers_all_content() { - $RetrieveRelated = new \LlmLaraHub\LlmDriver\Functions\SummarizeCollection(); - $messageArray = []; - - $messageArray[] = MessageInDto::from([ - 'content' => 'Can you summarize all this content for me', - 'role' => 'user', - ]); - $dto = CompletionResponse::from([ 'content' => 'This is a summary of the content', ]); - LlmDriverFacade::shouldReceive('driver->setToolType->chat') + LlmDriverFacade::shouldReceive('driver->setToolType->completion') ->once() ->andReturn($dto); @@ -57,37 +45,18 @@ public function test_gathers_all_content() 'chatable_id' => $collection->id, ]); - VerifyResponseAgent::shouldReceive('verify')->never()->andReturn( - VerifyPromptOutputDto::from( - [ - 'chattable' => $chat, - 'originalPrompt' => 'test', - 'context' => 'test', - 'llmResponse' => 'test', - 'verifyPrompt' => 'This is a completion so the users prompt was past directly to the llm with all the context.', - 'response' => 'verified yay!', - ] - )); - - $document = \App\Models\Document::factory()->create([ + \App\Models\Document::factory(3)->create([ 'collection_id' => $collection->id, + 'summary' => 'Foo bar', ]); - DocumentChunk::factory(3)->create( + $message = Message::factory()->create( [ - 'document_id' => $document->id, + 'chat_id' => $chat->id, + 'body' => 'Can you summarize all this content for me separating the content into 2 parts', ] ); - $functionCallDto = \LlmLaraHub\LlmDriver\Functions\FunctionCallDto::from([ - 'function_name' => 'summarize_collection', - 'arguments' => json_encode([ - 'prompt' => 'Can you summarize all this content for me', - ]), - ]); - - $message = Message::factory()->create(); - $results = (new SummarizeCollection())->handle($message); $this->assertInstanceOf(\LlmLaraHub\LlmDriver\Responses\FunctionResponse::class, $results); diff --git a/tests/fixtures/messages_before_final_job_claude.json b/tests/fixtures/messages_before_final_job_claude.json index 175c4bcc..9d7f9d8d 100644 --- a/tests/fixtures/messages_before_final_job_claude.json +++ b/tests/fixtures/messages_before_final_job_claude.json @@ -20,18 +20,18 @@ "meta_data": null }, { - "content": "It seems like there was no original thread to summarize. The conversation started with a request to list solutions based on the provided requirements, but it appears that I didn't receive any actual text to work with. If you'd like to provide the original text or clarify what you're looking for, I'll be happy to assist!", - "role": "assistant", + "content": "can you tldr this thread for me", + "role": "user", "is_ai": false, "show": true, - "tool": "", + "tool": "chat", "tool_id": "", "args": [], "meta_data": null }, { - "content": "can you summarize the results from this thread", - "role": "user", + "content": "Certainly! Here's a TL;DR of our conversation:\n\nTL;DR: The requirements outline a project for enhancing a website and resolving API integration issues for TechInnovate Solutions. The project involves fixing Laravel backend API problems and improving a VueJS frontend banner. Based on these requirements, we identified several relevant solutions from our collection, including:\n\n1. Experienced Laravel developer\n2. Full-stack development capability\n3. Iterative development approach\n4. Filament for Laravel admin panel\n5. Inertia and Vue for frontend\n6. Agile development methodology\n7. Performance optimization techniques\n\nThese solutions address various aspects of the project, from technical expertise to development approaches, aligning with the company's needs for both backend and frontend improvements within a tight timeline.", + "role": "assistant", "is_ai": false, "show": true, "tool": "chat", @@ -40,38 +40,34 @@ "meta_data": null }, { - "content": "Example Domain Example DomainThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.More information...", - "role": "tool", + "content": "can you summarize this collection for me", + "role": "user", "is_ai": false, "show": true, - "tool": "get_web_site_from_url", + "tool": null, "tool_id": "", - "args": { - "url": "https:\/\/www.example.com" - }, + "args": [], "meta_data": null }, { - "content": "\"The article discusses the best restaurants in Paris, focusing on lesser-known spots outside of the typical tourist areas. The four featured restaurants are:\\n\\n1. Le Maquis (18th arrondissement): A laid-back neighborhood bistro serving excellent bistro cooking with a Southern French or Italian accent.\\n2. Le Cadoret (19th arrondissement): A modern bistro in a former corner cafe, offering market-driven cooking and an affordable price point.\\n3. Cheval d'Or (19th arrondissement): A popular spot for modern Asian bistro cooking, featuring dishes like red tuna tartare and pork belly Tatin.\\n4. Le Baratin (20th arrondissement): A wine bar serving deeply satisfying food, with a menu that changes constantly but often features offal and fish.\\n\\nThe article highlights the unique character of each restaurant and the local neighborhoods they inhabit, making them stand out from the typical tourist destinations in Paris.\"\n\"It seems like you provided a long passage about hotels and restaurants in Paris, but I'll try to summarize the key points:\\n\\nThe passage describes several hotels in Paris, each with its own unique characteristics:\\n\\n1. H\\u00f4tel Le Bristol - A luxurious 5-star hotel with elegant rooms and suites.\\n2. H\\u00f4tel Costes - A chic and trendy 5-star hotel with stylish ambiance and a popular bar.\\n3. H\\u00f4tel Bassano - A charming 4-star boutique hotel offering elegance and modern comfort.\\n4. The Hoxton Paris - A cool 4-star boutique hotel with a vibrant atmosphere and stylish design.\\n5. Grand Pigalle H\\u00f4tel - A hip and stylish 4-star hotel with a unique blend of vintage and contemporary design.\\n6. H\\u00f4tel Presbytere - A charming 3-star hotel housed in a historic building with traditional Parisian architecture.\\n7. La Planque H\\u00f4tel - A boutique 3-star hotel offering a cozy and intimate atmosphere.\\n\\nThe passage also mentions the best food tours in Paris, a guide to secure luggage storage, and a local's food guide to Paris, which features the very best of the city's culinary scene.\\n\\nIf you'd like me to help with anything specific, please let me know!\"\n\"It looks like you've pasted the URL of a Tripadvisor page, which is likely to contain reviews and information about restaurants in Paris. The actual article text isn't present here, but I can try to help you with any specific questions or requests related to this page.\\n\\nIf you're looking for the \\\"RESULTS OF WEB SEARCH ARTICLE ONE OF A FIVE\\\", it seems like you might be referring to a summary or highlights of restaurant recommendations on that Tripadvisor page. Would you like me to:\\n\\n1. Help summarize the top-rated restaurants in Paris based on the Tripadvisor data?\\n2. Look up specific information about a particular restaurant mentioned on this page?\\n\\nPlease let me know how I can assist!\"", - "role": "tool", + "content": "can you summarize this collection for me", + "role": "user", "is_ai": false, "show": true, - "tool": "search_the_web", + "tool": null, "tool_id": "", - "args": { - "search_phrase": "best restaurants in Paris" - }, + "args": [], "meta_data": null }, { - "content": "This is an example document.", + "content": "Here's a more detailed template with sections for different types of content:\n\n**Summary Template**\n=====================\n\n### Overview\n---------------\n\n* Briefly summarize the main topic and key points.\n* If applicable, mention any notable figures, organizations, or events related to the content.\n\n### Key Points\n----------------\n\n* List the most important takeaways from the data.\n* Keep each point concise and focused on a single idea.\n* Use bullet points for easier reading and comprehension.\n\n### Considerations\n-------------------\n\n* Discuss potential implications, challenges, or limitations of the information.\n* Explore any potential connections to broader topics or real-world applications.\n* Suggest areas where further research or investigation might be necessary.\n\n### Recommendations\n--------------------\n\n* Provide actionable advice or guidance based on the analysis.\n* Offer specific suggestions for implementation or improvement.\n* Emphasize any benefits, such as cost savings, efficiency gains, or increased productivity.\n\n### Conclusion\n--------------\n\n* Summarize the main findings and takeaways from the data.\n* Reiterate the importance of considering these points in future decision-making or planning processes.\n* End with a thought-provoking question or call to action that encourages further exploration.", "role": "tool", "is_ai": false, "show": true, - "tool": "create_document", + "tool": "summarize_collection", "tool_id": "", "args": { - "content": "This is an example document." + "prompt": "can you summarize this collection for me" }, "meta_data": null } diff --git a/tests/fixtures/ollama_chat_payload.json b/tests/fixtures/ollama_chat_payload.json index fb7295bd..4a403f29 100644 --- a/tests/fixtures/ollama_chat_payload.json +++ b/tests/fixtures/ollama_chat_payload.json @@ -1,49 +1,30 @@ -{ - "model": "llama3.1", - "messages": [ - { - "content": "can you save to a document", - "role": "user" - }, - { - "content": "Here is a rewritten version of the text in a more formal and concise tone:\n\n**Summary:**\n\nHighly skilled Backend Developer with experience in PHP, Laravel, Vue.js, and other technologies. Proficient in designing, developing, and deploying scalable applications using Agile methodologies.\n\n**Professional Experience:**\n\n* Sr. Stack Developer, IBM Softlayer (Dec 2019 - Nov 2022)\n\t+ Developed backend PHP code for security teams\n\t+ Designed and implemented new features for clients\n\t+ Collaborated with internal and external teams to resolve issues and deploy new functionality\n* Sr. Web Developer, IBM Softlayer (Dec 2019 - Nov 2022)\n\t+ Developed web applications using PHP and Laravel\n\t+ Implemented unit tests and manual testing for new features\n\t+ Coordinated deployment of code changes across multiple servers\n\n**Technical Skills:**\n\n* Programming languages: PHP, JavaScript, Vue.js\n* Frameworks: Laravel, CodeIgniter, Symphony\n* Databases: MySQL, MS SQL Server 2005\/2008 R2, PostgreSQL\n* Operating Systems: Microsoft Windows, Mac OS X, Linux\n* Version control systems: Git (GitHub), SVN, CVS\n\n**Education and Training:**\n\n* ITIL Foundation course, Universidad Colima\n* Agile Methodologies and Scrum training, Cluster Tecnolog\u00eda Informaci\u00f3n en Colima\n* Ruby on Rails internship, Magma Lab Colima\n* Bright Coder graduate program, Magma Lab Colima", - "role": "assistant" - }, - { - "content": "can you just break that down into 4 bullet points", - "role": "user" - }, - { - "content": "which devs know laravel?", - "role": "user" - }, - { - "content": "This is data from the search results when entering the users prompt which is ### START PROMPT ### Which devs know laravel ### END PROMPT ### please use this with the following context and only this and return as markdown so I can render it: CV Jose Carlo Anaya Svam International, Inc. 08\\\/2023 Page 4 5 Responsibilities: Respons requir gathering, analysis, breakdown User Stori Estim stori points. Appli Scrum Methodolog follow strict plan projects. Analyze, design, develop test new implement applic improv intern oper Institut financial, internal, school control areas. Setup environ work use Sql Server 2008 R2 local database, Mysql databas develop testing, Php 7.2 Laravel 5.8 Framework, set intern network configur run up. Creat test develop database, clone migrat random information. Download, Setup Instal compos packag Laravel. Set environ variabl differ project branches. Create, Setup, connect branch Github. Use Eloqu Orm reliabl interact Mysql Db. Design, develop maintain applic.net Php Work.net replic main featur new develop Php Laravel. Creat Front-end view Account site featur use Html, Css, Javascript, jquery, Json, Bootstrap. Collabor develop new featur mainten intern Rest web applic base reports, chart statistics. Migrat function Wordpress Drupal Cms Laravel new web page institute. Manag content (html templat imag documents) intern applic Wordpress Publish Platform Cms. Creat plugin cover intern necess depart Isenco. Modifi bootstrap adapt theme necess Isenco. Creat updat databas schema requirements. Wrote Php script perform specif tasks. Respons fix bug issu backend frontend web applic report custom servic Qa. Use debug tool applic fix maintain.net function migrat changes, creat new featur.net new system. Perform test code certain applic ident bottlenecks, optim algorithms, leverag cach mechan improv applic speed responsiveness. Optim applic cross-brows compatibility. Appli best practic write refactor code, keep code clean, reusabl maintainable. Use Github Svn version control. Environment: Mamp Stack, Php 5.6\\\/7\\\/7.2, Mysql 5.5, Apach 2.0, Laravel 5.6\\\/5.8, Eloqu Orm, Html, Css, Javascript, Bootstrap, jqueri 1.9, Wordpress 3.3.1, Rest Webservices, Json, OS X. Api Laravel Develop Care Smartti Jun\\\/18 - Dec\\\/19 Laravel Develop Api Android App Stack Backend Develop Care startup born Guadalajara, Jalisco rent garag park lot make money it. Develop design land page, backend process interfac user Rest Api make communic Android App. Responsibilities: Respons requir gathering, analysis, breakdown user stori estim stori points. Appli Scrum Methodolog follow strict plan projects. Arrang daili meetup avoid doubt delay sprint. Defin sprint scope team product owner. Develop Laravel base Api interact client base requirement. CV Jose Carlo Anaya Svam International, Inc. 08\\\/2023 Page 5 5 Respons design Api endpoint respons interact mobil App Care Smarttie, Level Api. Built Php applic meet product requir satisfi use case use Mvc architecture. Creat Front-end view new applic featur use Html, Css, Javascript jqueri UI Javascript Bootstrap 3 4. Respons Databas Design Care Smarttie, Mysql database. Use Eloqu Orm reliabl interact Mysql Db. Creat updat databas schema requirements. Use Ajax techniqu enhanc user experi appropriate. Modifi Wordpress templat specif function main site. Wrote Php script perform specif tasks. Respons fix bug issu backend frontend web applic report custom servic Qa. Optim applic cross-brows compatibility. Mobil design land page Care Smarttie. Appli best practic write refactor code, keep code clean, reusabl maintainable. Setup develop environment, includ instal configur Linux, Apach Server 2.4, Mysql 5.5 Php 5.4, Php extensions. Use Github Svn version control. parti servic connect cloudinari cloud servic storag imag documents, Conekta.io payment method servic generat charg clients. Environment: Mamp stack, Php 5.6\\\/7\\\/7.2, Mysql 5.5, Apach 2.0, Laravel 5.6\\\/5.8, Eloqu Orm, Html, Css, Javascript, Bootstrap 3, 4 jqueri 1.9, Wordpress 3.3.1, Rest Webservices, Json, OS X. Deputi Director System Telemat Servic Secretari Educ Colima, MX Oct\\\/14 - May\\\/18 Project Manag Coordin Govern Colima, Mexico Platform inform Secretari Educ Project Manag I coordin activ softwar development, maintenance, updat design websit Unit, review coordin life cycl new project Unit (mobil develop new technologies), restructur networks, switches, servers, access servic policies, manag coordin mainten 960 basic educ school belong state educ system, respons team 40 peopl organ 4 team. Responsibilities: Respons Requir gathering. Creat rout map differ team department. Coordin morn standup meetings, regular team sync meetings, meet author government. Coordin migrat old system servic new version. Analis determin old hardware, softwar need coordin implement new one stakehold involv team persons. Team lead coordin intern project managers, middl final users. Coordin action delivery, maintenance, repair chang tablet comput laptop deliv Feder Govern student 5th 6th grade primari school state Colima. Migrat old Php Develop site use Codeignit Framework 2.1.3 base Mvc. Work develop team.net migrat servic new Saa service. meet teach new hire develop use.net intern system perform differ QA test valid use perform intern systems. CV Jose Carlo Anaya Svam International, Inc. 08\\\/2023 Page 2 5 Responsibilities: Develop in-hous reactiv driver portal application, util Php, Laravel, Vue.js, reduc user error improv effici proof deliveries, product refusals, returns, collect tracking. Work product data team enhanc autom abil import relat product data. Experi multipl design patterns, includ Factori pattern Builder pattern, ensur scalabl maintain codebases. Optim review Sql queri Mss databas multipl applic interact compani Erp improv reliabl performance. Owner multipl Microsoft Sql Server, Mysql, Elast Search databases. Work Handlebar Javascript librari maintain legaci code micro services, migrat possibl new code use Vue.js, Vuex frontend libraries. Requir gathering, analysis, breakdown User Stori Estim stori points. Appli Scrum Methodolog follow strict plan projects. Analyze, design, develop test new implement applic improv intern oper improv perform e-commerc platform. Creat updat Vue.j compon creat new featur requir intern extern vendor stakehold systems. Perform site optim releas improv scalabl compat current site new version softwar high demand intern oper e-commerc www.earlowen.com. Environment: Mamp Stack, Php 7.4,8.1, Mysql, Sql Server, Iie Server, Laravel Lumen, Eloqu Orm, Html, Css, Vue.js, Javascript, Bootstrap, Handlebar, Rest Api Webservices, Json, OS X, Window 11. Sr. Backend Developer, Ibm Softlayer. Dec\\\/19 - Nov\\\/22 Backend Php develop Ident Secur Team Ibm Softlay Sr. Web develop Ident Secur team Ibm Softlay respons develop design new function final clients. Valid exist test deploy new functionalities. Design, Creat Run Unit Test specif task insid compani ecosystem. Work intern extern expos inform valid test new featur fix bug creat new featur intern team extern client need. Create, valid piec code throw Php-unit use unit test, manual test. member Ident Secur team need Collabor differ team insid outsid Ibm determin issu report bug just need develop new function valid avoid secur issu inform expose. Coordin architect deploy team need updat softwar need updat live code intern extern deploy servers. Responsibilities: Setup local environ work differ version Php test develop certain new features, fix bug testing. Creat new issu intern track platform (jira). Create, test develop database, clone migrat specif inform make intern extern test imperson inform valid correct function exist features. Creat Unit Test specif tasks. Jose Carlo Anaya CH Avez Carlo Sr. Stack Develop extens experi expertis Php 5.6\\\/7\\\/7.2\\\/7.4\\\/8\\\/8.1. extens experi Model View Control (mvc) Design Pattern use Laravel 5.8 Php Frameworks. good knowledg Object Relat Map (orm) program technique. Iv make person practic develop theme plugin Wordpress Drupal; creat plugin work theme test featur Cms. Carlo experienc design, develop deploy distribut scalabl applic multi-ti architectur Mamp Lamp Stack (mac Osx Linux Apach Mysql & Php). creat multipl final user site base Content Manag System (cms). Carlo good experi creat mobil design front-end view applic featur use Html, Css, Javascript, jquery, Bootstrap, Materi Css. work Mysql, Microsoft Sql Server 2005, 2008 R2. hand experi version control system Github, Svn & Cvs experi work Cloud servic like Heroku, Digit Ocean Deploy. Creat Cron Job autom deploy Jenkins, Carlo Integr parti Api like Cloudinary, Conekta.io (to process payments), Twitter, Facebook, Googl Map hous Api system various 3rd parti tool frameworks. good knowledg Itil Agil Scrum methodologies, user stories, estim planning, continu delivery. excel communic skill work team lead differ technolog environ times. Technic Skills: Program Php,.net Markup Html, Xml, Css, Json, Xhtml Framework Laravel, Codeigniter, Symfoni Databas Mysql, MS Sql Server 2005 2008 R2, Postgresql Oper System Microsoft Windows, Mac Osx, Linux Orm Eloquent, Drifter, Zoom, Googl meet, Cisco Webex Test Phpunit framework, Selenium Javascript librari jquery, Bootstrap Js, Javascript, Vue.js, Handlebar Open-sourc Softwar Postman, Docker, Grafana Dashboards, Wordpress, Drupal Version Control Git (github), Svn, Cvs Softwar Methodolog Scrum, Agil Deploy Jenkins, Ansible, Docker Container, Heroku, Digit Ocean, Aw Profession Experience: Sr. Stack Laravel\\\/vu Developer, Earlowen Compani Carrollton, Tx. Dec\\\/22 - Agu\\\/23 Backend Laravel Frontend Vue.j Develop ecommerc intern System Earlowen.com Stack develop Earlowen Co. main focus think optim improv perform home-mad e-commerc Site build Vue.j Javascript Laravel Lumen micro servic system gather inform 10k differ parts, clients, truck deliver, sellers, outsal repres administr person work problems. Ensur data synchron intern extern administr system Elasticsearch engine, updat improv exist queri data end points. CV Jose Carlo Anaya Svam International, Inc. 08\\\/2023 Page 7 5 Courses: Itil Foundat Universidad Colima. Agil Methodolog Scrum Clster Tecnologa Informacin en Colima. Rubi Rail Internship Magma Lab Colima. Bright Coder graduat Magma Lab Colima. ", - "role": "user" - } - ], - "stream": false, - "options": { - "temperature": 0 +[ + { + "content": "using the follow requirements list what are some solutions we have in this collection.\nWhen you find them just share a 1 liner to explain what they are about and another as to why you chose it\n\n---- requirements below ---\n# Request for Proposal: Website Enhancement and API Integration\n## 1. Introduction\nOur company, TechInnovate Solutions, is seeking proposals from qualified web development\nagencies or freelance developers to enhance our existing website and resolve critical issues\nwith our API and frontend components. This project aims to improve our website's\nfunctionality, performance, and user experience.\n## 2. Company Background\nTechInnovate Solutions is a leading provider of cloud-based software solutions for small to\nmedium-sized businesses. Founded in 2015, we have grown to serve over 10,000 customers\nacross North America. Our flagship product, CloudManage Pro, helps businesses streamline\ntheir operations, manage customer relationships, and optimize their supply chain processes.\n## 3. Project Overview\nWe are looking to address two main issues with our current website:\n1. API Integration Problem: Our website's backend, built with Laravel, is experiencing issues\nwith API calls, affecting data retrieval and submission processes.\n2. Frontend Banner Quality: The VueJS-powered banner on our homepage is displaying low-\nquality images, impacting the overall user experience and brand perception.\n## 4. Scope of Work\n### 4.1 API Issue Resolution\n- Diagnose the current API integration problems\n- Implement necessary fixes to ensure smooth data flow between frontend and backend\n- Optimize API calls for improved performance\n- Ensure proper error handling and logging\n- Update API documentation as needed\n### 4.2 VueJS Banner Enhancement\n- Investigate the cause of low-quality images in the banner\n- Implement image optimization techniques\n- Ensure responsive design across various devices and screen sizes\n- Improve loading times for banner images\n- Implement lazy loading if appropriate\n### 4.3 General Improvements\n- Conduct a brief audit of the existing codebase\n- Suggest and implement any critical optimizations\n- Ensure cross-browser compatibility\n- Improve overall website performance\n## 5. Technical Requirements\n### 5.1 Backend\n- Laravel framework (version 8.0 or higher)\n- PHP 7.4 or higher\n- MySQL database\n- RESTful API architecture\n### 5.2 Frontend\n- VueJS framework (version 3.0 or higher)\n- HTML5, CSS3, JavaScript\n- Responsive design principles\n- Modern browser compatibility (Chrome, Firefox, Safari, Edge)\n## 6. Deliverables\n1. Fully functional API with resolved integration issues\n2. Optimized VueJS banner with high-quality images\n3. Updated codebase with implemented improvements\n4. Comprehensive documentation of changes and optimizations\n5. Knowledge transfer session with our in-house development team\n## 7. Timeline\nWe anticipate this project to be completed within 2-3 weeks from the start date. Here's a\nproposed timeline:\n- Week 1: API diagnosis and initial fixes\n- Week 2: VueJS banner optimization and general improvements\n- Week 3: Final testing, documentation, and knowledge transfer\n## 8. Budget\nWhile we value quality work, we also have budget constraints. We are looking for the most\ncost-effective solution that meets our requirements. Please provide a detailed breakdown of\nyour costs in your proposal.\n## 9. Proposal Requirements\nYour proposal should include:\n1. Company\/Individual overview and relevant experience\n2. Detailed approach to solving our issues\n3. Proposed timeline\n4. Cost breakdown\n5. Team structure (if applicable)\n6. At least two references from similar projects\n## 10. Evaluation Criteria\nProposals will be evaluated based on the following criteria:\n1. Technical expertise (40%)\n2. Proposed approach and methodology (25%)\n3. Cost effectiveness (20%)\n4. Timeline and ability to meet deadlines (10%)\n5. References and past performance (5%)\n## 11. Submission Guidelines\nPlease submit your proposal in PDF format to rfp@techinnovatesolutions.com by [Insert Date].\nThe subject line should read \"Proposal - Website Enhancement Project\".\n## 12. Contact Information\nFor any questions or clarifications regarding this RFP, please contact:\nJohn Doe\nProject Manager, TechInnovate Solutions\nEmail: john.doe@techinnovatesolutions.com\nPhone: (555) 123-4567\nWe look forward to reviewing your proposals and potentially working with you to enhance our\nwebsite and improve our user experience.", + "role": "user" }, - "tools": [ - { - "type": "function", - "function": { - "name": "chat_only", - "description": "User just wants to continue the chat no need to look in the collection for more documents", - "parameters": { - "type": "object", - "properties": { - "prompt": { - "description": "the prompt to go with the chat", - "type": "string", - "default": "" - } - }, - "required": [] - } - } - } - ] -} \ No newline at end of file + { + "content": "Based on the requirements and the solutions presented in our conversation, here are some relevant solutions from our collection:\n\n1. Experienced Laravel developer:\n One-liner: Developer with extensive Laravel experience, including 10 years as a lead contractor at Pfizer.\n Why chosen: Directly addresses the technical expertise requirement for Laravel backend development.\n\n2. Full-stack development capability:\n One-liner: Comprehensive development skills covering both backend (API) and frontend (VueJS) issues.\n Why chosen: Aligns with the project's need for both API resolution and frontend banner enhancement.\n\n3. Build-measure-learn philosophy:\n One-liner: Iterative development approach focusing on continuous improvement and optimization.\n Why chosen: Fits the project's timeline and scope, allowing for ongoing refinement of both API and frontend components.\n\n4. Filament for Laravel:\n One-liner: Powerful admin panel and application framework for Laravel.\n Why chosen: Can address API integration issues and provide an easy-to-use interface for managing backend operations.\n\n5. Inertia and Vue for the frontend:\n One-liner: Approach combining Inertia and Vue for seamless frontend development.\n Why chosen: Aligns with the VueJS requirements and can help resolve frontend banner quality issues.\n\n6. Agile development approach:\n One-liner: Iterative development with frequent feedback and adjustments.\n Why chosen: Matches the need for flexibility and rapid development within the tight project timeline.\n\n7. Performance optimization techniques:\n One-liner: Methods to enhance website speed and responsiveness.\n Why chosen: Directly addresses the requirement for improving loading times and overall website performance.", + "role": "assistant" + }, + { + "content": "can you tldr this thread for me", + "role": "user" + }, + { + "content": "Certainly! Here's a TL;DR of our conversation:\n\nTL;DR: The requirements outline a project for enhancing a website and resolving API integration issues for TechInnovate Solutions. The project involves fixing Laravel backend API problems and improving a VueJS frontend banner. Based on these requirements, we identified several relevant solutions from our collection, including:\n\n1. Experienced Laravel developer\n2. Full-stack development capability\n3. Iterative development approach\n4. Filament for Laravel admin panel\n5. Inertia and Vue for frontend\n6. Agile development methodology\n7. Performance optimization techniques\n\nThese solutions address various aspects of the project, from technical expertise to development approaches, aligning with the company's needs for both backend and frontend improvements within a tight timeline.", + "role": "assistant" + }, + { + "content": "can you summarize this collection for me", + "role": "user" + }, + { + "content": "can you summarize this collection for me", + "role": "user" + }, + { + "content": "Here's a more detailed template with sections for different types of content:\n\n**Summary Template**\n=====================\n\n### Overview\n---------------\n\n* Briefly summarize the main topic and key points.\n* If applicable, mention any notable figures, organizations, or events related to the content.\n\n### Key Points\n----------------\n\n* List the most important takeaways from the data.\n* Keep each point concise and focused on a single idea.\n* Use bullet points for easier reading and comprehension.\n\n### Considerations\n-------------------\n\n* Discuss potential implications, challenges, or limitations of the information.\n* Explore any potential connections to broader topics or real-world applications.\n* Suggest areas where further research or investigation might be necessary.\n\n### Recommendations\n--------------------\n\n* Provide actionable advice or guidance based on the analysis.\n* Offer specific suggestions for implementation or improvement.\n* Emphasize any benefits, such as cost savings, efficiency gains, or increased productivity.\n\n### Conclusion\n--------------\n\n* Summarize the main findings and takeaways from the data.\n* Reiterate the importance of considering these points in future decision-making or planning processes.\n* End with a thought-provoking question or call to action that encourages further exploration.", + "role": "tool" + } +] \ No newline at end of file diff --git a/tests/fixtures/ollama_chat_payload_before_remap.json b/tests/fixtures/ollama_chat_payload_before_remap.json new file mode 100644 index 00000000..9d7f9d8d --- /dev/null +++ b/tests/fixtures/ollama_chat_payload_before_remap.json @@ -0,0 +1,74 @@ +[ + { + "content": "using the follow requirements list what are some solutions we have in this collection.\nWhen you find them just share a 1 liner to explain what they are about and another as to why you chose it\n\n---- requirements below ---\n# Request for Proposal: Website Enhancement and API Integration\n## 1. Introduction\nOur company, TechInnovate Solutions, is seeking proposals from qualified web development\nagencies or freelance developers to enhance our existing website and resolve critical issues\nwith our API and frontend components. This project aims to improve our website's\nfunctionality, performance, and user experience.\n## 2. Company Background\nTechInnovate Solutions is a leading provider of cloud-based software solutions for small to\nmedium-sized businesses. Founded in 2015, we have grown to serve over 10,000 customers\nacross North America. Our flagship product, CloudManage Pro, helps businesses streamline\ntheir operations, manage customer relationships, and optimize their supply chain processes.\n## 3. Project Overview\nWe are looking to address two main issues with our current website:\n1. API Integration Problem: Our website's backend, built with Laravel, is experiencing issues\nwith API calls, affecting data retrieval and submission processes.\n2. Frontend Banner Quality: The VueJS-powered banner on our homepage is displaying low-\nquality images, impacting the overall user experience and brand perception.\n## 4. Scope of Work\n### 4.1 API Issue Resolution\n- Diagnose the current API integration problems\n- Implement necessary fixes to ensure smooth data flow between frontend and backend\n- Optimize API calls for improved performance\n- Ensure proper error handling and logging\n- Update API documentation as needed\n### 4.2 VueJS Banner Enhancement\n- Investigate the cause of low-quality images in the banner\n- Implement image optimization techniques\n- Ensure responsive design across various devices and screen sizes\n- Improve loading times for banner images\n- Implement lazy loading if appropriate\n### 4.3 General Improvements\n- Conduct a brief audit of the existing codebase\n- Suggest and implement any critical optimizations\n- Ensure cross-browser compatibility\n- Improve overall website performance\n## 5. Technical Requirements\n### 5.1 Backend\n- Laravel framework (version 8.0 or higher)\n- PHP 7.4 or higher\n- MySQL database\n- RESTful API architecture\n### 5.2 Frontend\n- VueJS framework (version 3.0 or higher)\n- HTML5, CSS3, JavaScript\n- Responsive design principles\n- Modern browser compatibility (Chrome, Firefox, Safari, Edge)\n## 6. Deliverables\n1. Fully functional API with resolved integration issues\n2. Optimized VueJS banner with high-quality images\n3. Updated codebase with implemented improvements\n4. Comprehensive documentation of changes and optimizations\n5. Knowledge transfer session with our in-house development team\n## 7. Timeline\nWe anticipate this project to be completed within 2-3 weeks from the start date. Here's a\nproposed timeline:\n- Week 1: API diagnosis and initial fixes\n- Week 2: VueJS banner optimization and general improvements\n- Week 3: Final testing, documentation, and knowledge transfer\n## 8. Budget\nWhile we value quality work, we also have budget constraints. We are looking for the most\ncost-effective solution that meets our requirements. Please provide a detailed breakdown of\nyour costs in your proposal.\n## 9. Proposal Requirements\nYour proposal should include:\n1. Company\/Individual overview and relevant experience\n2. Detailed approach to solving our issues\n3. Proposed timeline\n4. Cost breakdown\n5. Team structure (if applicable)\n6. At least two references from similar projects\n## 10. Evaluation Criteria\nProposals will be evaluated based on the following criteria:\n1. Technical expertise (40%)\n2. Proposed approach and methodology (25%)\n3. Cost effectiveness (20%)\n4. Timeline and ability to meet deadlines (10%)\n5. References and past performance (5%)\n## 11. Submission Guidelines\nPlease submit your proposal in PDF format to rfp@techinnovatesolutions.com by [Insert Date].\nThe subject line should read \"Proposal - Website Enhancement Project\".\n## 12. Contact Information\nFor any questions or clarifications regarding this RFP, please contact:\nJohn Doe\nProject Manager, TechInnovate Solutions\nEmail: john.doe@techinnovatesolutions.com\nPhone: (555) 123-4567\nWe look forward to reviewing your proposals and potentially working with you to enhance our\nwebsite and improve our user experience.", + "role": "user", + "is_ai": false, + "show": true, + "tool": "gather_info_tool", + "tool_id": "", + "args": [], + "meta_data": null + }, + { + "content": "Based on the requirements and the solutions presented in our conversation, here are some relevant solutions from our collection:\n\n1. Experienced Laravel developer:\n One-liner: Developer with extensive Laravel experience, including 10 years as a lead contractor at Pfizer.\n Why chosen: Directly addresses the technical expertise requirement for Laravel backend development.\n\n2. Full-stack development capability:\n One-liner: Comprehensive development skills covering both backend (API) and frontend (VueJS) issues.\n Why chosen: Aligns with the project's need for both API resolution and frontend banner enhancement.\n\n3. Build-measure-learn philosophy:\n One-liner: Iterative development approach focusing on continuous improvement and optimization.\n Why chosen: Fits the project's timeline and scope, allowing for ongoing refinement of both API and frontend components.\n\n4. Filament for Laravel:\n One-liner: Powerful admin panel and application framework for Laravel.\n Why chosen: Can address API integration issues and provide an easy-to-use interface for managing backend operations.\n\n5. Inertia and Vue for the frontend:\n One-liner: Approach combining Inertia and Vue for seamless frontend development.\n Why chosen: Aligns with the VueJS requirements and can help resolve frontend banner quality issues.\n\n6. Agile development approach:\n One-liner: Iterative development with frequent feedback and adjustments.\n Why chosen: Matches the need for flexibility and rapid development within the tight project timeline.\n\n7. Performance optimization techniques:\n One-liner: Methods to enhance website speed and responsiveness.\n Why chosen: Directly addresses the requirement for improving loading times and overall website performance.", + "role": "assistant", + "is_ai": false, + "show": true, + "tool": "gather_info_tool", + "tool_id": "", + "args": [], + "meta_data": null + }, + { + "content": "can you tldr this thread for me", + "role": "user", + "is_ai": false, + "show": true, + "tool": "chat", + "tool_id": "", + "args": [], + "meta_data": null + }, + { + "content": "Certainly! Here's a TL;DR of our conversation:\n\nTL;DR: The requirements outline a project for enhancing a website and resolving API integration issues for TechInnovate Solutions. The project involves fixing Laravel backend API problems and improving a VueJS frontend banner. Based on these requirements, we identified several relevant solutions from our collection, including:\n\n1. Experienced Laravel developer\n2. Full-stack development capability\n3. Iterative development approach\n4. Filament for Laravel admin panel\n5. Inertia and Vue for frontend\n6. Agile development methodology\n7. Performance optimization techniques\n\nThese solutions address various aspects of the project, from technical expertise to development approaches, aligning with the company's needs for both backend and frontend improvements within a tight timeline.", + "role": "assistant", + "is_ai": false, + "show": true, + "tool": "chat", + "tool_id": "", + "args": [], + "meta_data": null + }, + { + "content": "can you summarize this collection for me", + "role": "user", + "is_ai": false, + "show": true, + "tool": null, + "tool_id": "", + "args": [], + "meta_data": null + }, + { + "content": "can you summarize this collection for me", + "role": "user", + "is_ai": false, + "show": true, + "tool": null, + "tool_id": "", + "args": [], + "meta_data": null + }, + { + "content": "Here's a more detailed template with sections for different types of content:\n\n**Summary Template**\n=====================\n\n### Overview\n---------------\n\n* Briefly summarize the main topic and key points.\n* If applicable, mention any notable figures, organizations, or events related to the content.\n\n### Key Points\n----------------\n\n* List the most important takeaways from the data.\n* Keep each point concise and focused on a single idea.\n* Use bullet points for easier reading and comprehension.\n\n### Considerations\n-------------------\n\n* Discuss potential implications, challenges, or limitations of the information.\n* Explore any potential connections to broader topics or real-world applications.\n* Suggest areas where further research or investigation might be necessary.\n\n### Recommendations\n--------------------\n\n* Provide actionable advice or guidance based on the analysis.\n* Offer specific suggestions for implementation or improvement.\n* Emphasize any benefits, such as cost savings, efficiency gains, or increased productivity.\n\n### Conclusion\n--------------\n\n* Summarize the main findings and takeaways from the data.\n* Reiterate the importance of considering these points in future decision-making or planning processes.\n* End with a thought-provoking question or call to action that encourages further exploration.", + "role": "tool", + "is_ai": false, + "show": true, + "tool": "summarize_collection", + "tool_id": "", + "args": { + "prompt": "can you summarize this collection for me" + }, + "meta_data": null + } +] \ No newline at end of file diff --git a/tests/fixtures/ollama_chat_response.json b/tests/fixtures/ollama_chat_response.json index 3c56d5f6..7041b0e3 100644 --- a/tests/fixtures/ollama_chat_response.json +++ b/tests/fixtures/ollama_chat_response.json @@ -1,16 +1,16 @@ { - "model": "phi3", - "created_at": "2024-05-20T01:57:46.168876Z", + "model": "llama3.1", + "created_at": "2024-08-04T20:39:16.536438Z", "message": { "role": "assistant", - "content": "To address the \"test\" instruction effectively, I'll provide a response as if it were part of an automated system designed to handle user inputs or test cases. Since there is no specific context given, let me assume we are discussing a software application that might receive this input for testing purposes:\n\n\n```\n\nTest Case #1: Input Validation Test\n\nObjective: Verify the application correctly handles an unexpected input string (test).\n\nSteps:\n\n1. Open the application and navigate to the relevant input field where test strings are usually entered.\n\n2. Enter \"test\" into the specified text field without any formatting or additional characters.\n\n3. Submit the entry.\n\nExpected Result: The application should either accept \"test\" as a valid input if it's meant to be accepted in this context, or provide an appropriate error message if such input is not expected or supported by the system.\n\n```\n\nThis example demonstrates how one might construct a test case for handling the specific string \"test.\" Depending on what kind of application you are testing (web form, command-line interface, etc.), and what behavior is intended when encountering this string, your actual instructions would vary accordingly." + "content": "This template is not actually summarizing any collection, but rather providing a general outline for summarizing content.\n\nIf you'd like, I can try to summarize the original requirements document from our previous conversation. Here's a brief summary:\n\n**Summary**\n\nTechInnovate Solutions is seeking proposals for website enhancement and API integration services. The project involves resolving critical issues with their existing website, including API calls and frontend banner quality. The scope of work includes diagnosing and fixing API integration problems, optimizing API calls, updating API documentation, and improving the VueJS-powered banner on the homepage. The company is looking for a cost-effective solution that meets their requirements within a 2-3 week timeline.\n\nLet me know if you'd like me to expand on this summary or provide further clarification!" }, "done_reason": "stop", "done": true, - "total_duration": 6352558125, - "load_duration": 4046250, - "prompt_eval_count": 12, - "prompt_eval_duration": 82735000, - "eval_count": 260, - "eval_duration": 6263825000 + "total_duration": 12383716750, + "load_duration": 40779791, + "prompt_eval_count": 1721, + "prompt_eval_duration": 5441013000, + "eval_count": 157, + "eval_duration": 6885946000 } \ No newline at end of file diff --git a/tests/fixtures/summarize_collection_prompt.txt b/tests/fixtures/summarize_collection_prompt.txt new file mode 100644 index 00000000..b361cb05 --- /dev/null +++ b/tests/fixtures/summarize_collection_prompt.txt @@ -0,0 +1,282 @@ +can you summarize this collection for me # Frontend Strategy for Simplicity and Efficiency + +## Key Technologies +- Inertia.js +- Vue.js +- Laravel (backend integration) + +## Core Approach +Our frontend strategy prioritizes simplicity and efficiency by leveraging Inertia.js in conjunction with Vue.js. This approach allows us to create dynamic, responsive websites while minimizing the complexity often associated with JavaScript-heavy applications. + +## Benefits +1. **Seamless Laravel Integration**: Inertia.js is a first-class citizen in the Laravel ecosystem, ensuring smooth coordination between frontend and backend. + +2. **Reduced Complexity**: By using Inertia.js, we can build dynamic interfaces without the overhead typically required in complex single-page applications (SPAs). + +3. **Developer Productivity**: The combination of Inertia.js and Vue.js allows for rapid development and easier maintenance of frontend code. + +4. **Enhanced User Experience**: This strategy enables the creation of fast, responsive interfaces that behave like SPAs but with simpler architecture. + +## Conclusion +Our frontend strategy strikes a balance between modern, dynamic user interfaces and development simplicity. This approach aligns well with Laravel-based projects, offering an efficient path to building robust web applications.\n# Agency History + +## Early Years +- Started as a PHP development shop for 2 years + +## Pfizer Experience +- Served as lead Laravel contractor at Pfizer for 10 years +- Progressed to Director of Laravel team and applications for the last 3 years at Pfizer + - Oversaw development of Laravel applications created by Alfred Nutile + +## Recent Work +- For the past 3 years: + - Focused on building applications for companies of various sizes + - Expanded client base beyond pharmaceutical industry + +## Key Points +- Extensive experience in PHP and Laravel development +- Leadership role in a major pharmaceutical company +- Transition from specialized industry work to diverse client projects +- Demonstrated ability to scale from individual contributor to director-level position + +This history showcases a progression from specialized development to broader application creation across multiple industries, highlighting both technical expertise and leadership capabilities.\n# Agile Development Approach + +## Key Points: + +- Iterative Progress + - Results visible week-to-week and day-to-day + - Continuous communication and building upon progress + +- Flexible Planning + - No extensive upfront design + - Adaptable to changing requirements + +- Client-Centric + - Avoiding fixed bids for unwanted features + - Focus on delivering value aligned with client needs + +## Summary: + +This approach emphasizes an agile methodology in software development. It prioritizes rapid, incremental progress with frequent check-ins and adjustments. By avoiding rigid upfront planning and fixed-price contracts, the process remains adaptable to evolving client needs and market conditions. This strategy aims to ensure that the final product closely aligns with the client's actual requirements, potentially saving time and resources by preventing the development of unnecessary or unwanted features.\n# Sundance Solutions: Agency History + +## Key Points: +- Founded and owned by Alfred Nutile +- Specializes in Laravel Applications development +- Over 14 years of experience in the field + +## Notable Clients: +- Large corporations: Pfizer +- Small businesses: RuffTools + +## Expertise: +- Long-standing experience with Laravel framework +- Versatility in handling projects of various scales + +## Summary: +Sundance Solutions, led by Alfred Nutile, has established itself as a seasoned Laravel application development agency. With more than 14 years of dedicated experience, the company has demonstrated its ability to cater to a diverse clientele, ranging from pharmaceutical giants like Pfizer to smaller enterprises such as RuffTools. This wide-ranging portfolio showcases Sundance Solutions' adaptability and expertise in creating custom Laravel applications for businesses of all sizes.\n# Capabilities Overview + +## Full-Stack Development with Strategic Partnership + +Our agency offers a comprehensive approach to digital product development, characterized by: + +### Technical Expertise +- Full-stack development capabilities +- Versatility in handling all aspects of software creation + +### Strategic Leadership +- Direct involvement of the CTO in project planning and execution +- Focus on clearly defining client vision and goals at every stage + +### Iterative Methodology +- Adoption of the "build, measure, learn" philosophy +- Emphasis on creating products that align with both client vision and customer needs + +### Collaborative Approach +- Partnership-oriented relationship with clients +- Ongoing guidance and support throughout the development process + +Our unique value proposition lies in combining technical proficiency with strategic insight, ensuring that each project not only meets technical specifications but also advances the client's broader business objectives.\nHere is a synthesized summary of the retrieved information in markdown format: + +# Filament: Streamlining Admin Interfaces + +## Key Benefits +- **Time-saving**: Accelerates development of administrative interfaces +- **User-friendly**: Provides easy-to-use dashboards and user management tools +- **Maintainable**: Results in a codebase that's simpler to support + +## Use Cases +Filament is particularly valuable when: +- Building admin dashboards +- Implementing user management systems +- Project requirements align with Filament's capabilities + +## Strategic Advantage +By leveraging Filament in appropriate scenarios, development teams can: +1. Reduce time-to-market for admin features +2. Improve overall code maintainability +3. Deliver intuitive interfaces for end-users + +> "When your needs fit Filament, we use it to save time and provide for you an easy to support code base."\n# Rapid Prototype Development Strategy + +## Key Points: + +1. **Solid Foundation**: + - Project starts with a robust and flexible technological base + - Eliminates time waste on technical setup + - Allows immediate focus on business goals + +2. **90-10 Strategy**: + - Concentrate on the unique 10% of your idea + - Prove concept viability quickly + - Leverage existing solutions for the remaining 90% + +3. **Laravel Stack Foundation**: + - Covers majority of common functionalities + - Provides reliable infrastructure for rapid development + +4. **Business-Centric Approach**: + - Emphasis on building the right things + - Quick iteration and validation of core concepts + +## Summary: + +This strategy emphasizes rapid prototype development by leveraging a pre-existing technological foundation. By focusing efforts on the unique aspects of a project, it enables quick proof-of-concept and efficient use of resources. The approach aims to accelerate the development process, allowing businesses to validate and refine their ideas swiftly, ultimately leading to more effective and targeted solutions.\nHere is a synthesized summary of the retrieved information: + +# AI Integration in Web Applications + +## Key Points: +- AI and large language model (LLM) integration is becoming essential for modern web applications +- An open source tool called LaraLlama.io has been created to facilitate this integration + +## Significance: +- Enables developers to easily incorporate AI capabilities into their web projects +- Leverages the power of LLMs to enhance application functionality and user experience +- Open source nature promotes collaboration and accessibility + +## Strategic Implications: +- Adopting tools like LaraLlama.io can give web applications a competitive edge +- May lead to more intelligent, responsive, and personalized web experiences +- Could potentially reduce development time and costs for AI-powered features + +## Considerations: +- Evaluate LaraLlama.io's capabilities and compatibility with existing tech stacks +- Consider the learning curve and resources required for implementation +- Assess the potential impact on application performance and scalability + +This information suggests a growing trend towards AI integration in web development, with open source tools emerging to support this shift.\nHere is a synthesized summary of the retrieved information: + +# Sundance Consulting Cost Structure + +## Key Points: +- Sundance operates with a lean team structure +- Primary point of contact is Alfred Nutile, the sole staff member +- Direct collaboration with the product owner + +## Team Expansion: +- Additional team members only brought on if: + 1. Mutually agreed upon + 2. Necessary for project needs +- Any new staff would be from Alfred's trusted network + +## Implications: +- Potentially lower overhead costs +- Highly personalized service +- Flexibility to scale as needed +- Emphasis on direct communication and collaboration + +This structure suggests a focus on efficiency and tailored service, with the ability to expand resources judiciously as project demands require.\n# Scalability Strategy + +## Key Points: + +1. **Right-Sizing Approach**: Build for current needs without overbuilding. +2. **Scalable Patterns**: Implement designs that allow for easy scaling as demand grows. +3. **Cost Management**: Avoid unexpected high hosting bills through careful planning. + +## Summary: + +The strategy for scalability focuses on a balanced approach that prioritizes efficiency and adaptability. Rather than overbuilding from the start, the emphasis is on creating a solution that fits current requirements while incorporating scalable design patterns. This approach ensures that the system can grow as needed without incurring unnecessary costs upfront. + +## Benefits: + +- **Optimized Resource Usage**: Avoid wasting resources on unused capacity. +- **Flexibility**: Easily adapt to changing demands. +- **Cost-Effective**: Manage expenses by scaling only when necessary. + +## Conclusion: + +By adopting this strategy, organizations can maintain an agile infrastructure that grows with their needs, ensuring both performance and cost-effectiveness throughout the scaling process.\nHere is a synthesized summary of the retrieved information: + +# AI-Powered Business Automation + +Artificial intelligence (AI) has arrived and is ready to transform your company's operations. Here are some key ways AI can be leveraged: + +## Immediate Implementation +- AI solutions are available now for immediate adoption and integration + +## Automation Opportunities +- Streamline repetitive tasks +- Assist teams with day-to-day operations +- Enhance efficiency across departments + +## Specific Use Cases +1. **Customer Feedback Analysis** + - Automatically summarize and categorize customer comments + - Extract key insights to improve products/services + +2. **Marketing Optimization** + - Simplify campaign planning and execution + - Analyze marketing data for better targeting + +3. **Email Management** + - Intelligent inbox sorting and prioritization + - Automated responses to common inquiries + +4. **Additional Applications** + - Many other potential use cases across business functions + +By adopting AI tools, companies can boost productivity, reduce manual workloads, and gain valuable insights to drive strategic decisions.\n# Product Development Strategy: Build-Measure-Learn + +As your CTO, I recommend adopting the Build-Measure-Learn strategy to ensure we're developing our product efficiently and effectively. This approach, popularized by Eric Ries in "The Lean Startup," will help us iterate quickly and minimize waste. + +## Key Components: + +1. **Build**: Create a Minimum Viable Product (MVP) + - Focus on core features + - Rapid prototyping + - Emphasis on speed over perfection + +2. **Measure**: Gather Data + - Implement analytics + - Collect user feedback + - Track key performance indicators (KPIs) + +3. **Learn**: Analyze and Adjust + - Interpret data and feedback + - Make data-driven decisions + - Pivot or persevere based on insights + +## Benefits: + +- Faster time-to-market +- Reduced risk of building unwanted features +- Continuous improvement based on real user data +- Efficient use of resources + +## Implementation: + +1. Define clear hypotheses for each feature +2. Set measurable goals and metrics +3. Establish short development cycles (sprints) +4. Regular review and planning sessions + +By following this strategy, we'll ensure we're building just enough to meet user needs while continuously improving our product based on real-world data and feedback.\nSince there's no specific content to summarize, I'll create a general summary template that you can modify as needed: + +# Summary +===================================== + +Based on the retrieved data, here are some key insights and information: + +* No specific data was provided for summarization. +* The RAG system was used to retrieve example document information. + +Feel free to add or modify this summary as per your requirements! \ No newline at end of file diff --git a/tests/fixtures/summarize_collection_response.json b/tests/fixtures/summarize_collection_response.json new file mode 100644 index 00000000..0d673976 --- /dev/null +++ b/tests/fixtures/summarize_collection_response.json @@ -0,0 +1,9 @@ +{ + "content": "It seems there's no specific content to summarize. However, I can provide a general template that you can fill in:\n\n# Summary\n=====================================\n\n**Key Takeaways**\n\n* [Insert key points or insights]\n* [Additional information or context]\n\n**Recommendations\/Implications**\n\n* [Actionable steps or implications based on the retrieved data]\n* [Potential benefits or outcomes]\n\n**Next Steps**\n\n* [Future actions or plans based on the summary]\n* [Any additional context or considerations]\n\nFeel free to modify this template as per your needs!", + "stop_reason": "stop", + "tool_used": "", + "tool_calls": [], + "input_tokens": 1026, + "output_tokens": 112, + "model": "llama3.1" +} \ No newline at end of file diff --git a/tests/fixtures/tool_complete_response_claude.json b/tests/fixtures/tool_complete_response_claude.json index ce54a4c1..2421e23d 100644 --- a/tests/fixtures/tool_complete_response_claude.json +++ b/tests/fixtures/tool_complete_response_claude.json @@ -1,9 +1,9 @@ { - "content": "It seems that there was no original text to summarize, but rather a series of responses to hypothetical tool calls.\n\nHowever, based on the conversation, here are some possible summaries:\n\n* The first response was about summarizing solutions from a collection, but it appears that there was no actual text to work with.\n* The second response was about summarizing a passage about hotels and restaurants in Paris. The key points mentioned were:\n\t+ A list of 7 hotels in Paris, each with its own unique characteristics\n\t+ A mention of the best food tours in Paris\n\t+ A guide to secure luggage storage\n\t+ A local's food guide to Paris featuring the city's culinary scene\n* The third response was about summarizing a Tripadvisor page. However, it appears that the actual article text wasn't present, but rather a URL.\n* The fourth response was about helping with specific questions or requests related to the Tripadvisor page.\n\nIf you'd like me to help with anything specific, please let me know!", + "content": "This template is not actually summarizing any collection, but rather providing a general outline for summarizing content.\n\nIf you'd like, I can try to summarize the original requirements document from our previous conversation. Here's a brief summary:\n\n**Summary**\n\nTechInnovate Solutions is seeking proposals for website enhancement and API integration services. The project involves resolving critical issues with their existing website, including API calls and frontend banner quality. The scope of work includes diagnosing and fixing API integration problems, optimizing API calls, updating API documentation, and improving the VueJS-powered banner on the homepage. The company is looking for a cost-effective solution that meets their requirements within a 2-3 week timeline.\n\nLet me know if you'd like me to expand on this summary or provide further clarification!", "stop_reason": "stop", "tool_used": "", "tool_calls": [], - "input_tokens": 1130, - "output_tokens": 206, + "input_tokens": 1721, + "output_tokens": 157, "model": "llama3.1" } \ No newline at end of file