code: "/* (C)2024 */\npackage chatv2post;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2ChatRequest;\nimport com.cohere.api.resources.v2.types.V2ChatRequestDocumentsItem;\nimport com.cohere.api.types.*;\nimport java.util.List;\n\npublic class Documents {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<<apiKey>>\").clientName(\"snippet\").build();\n\n ChatResponse response =\n cohere\n .v2()\n .chat(\n V2ChatRequest.builder()\n .model(\"command-r-plus-08-2024\")\n .messages(\n List.of(\n ChatMessageV2.user(\n UserMessage.builder()\n .content(\n UserMessageContent.of(\"Who is\" + \" the most\" + \" popular?\"))\n .build())))\n .documents(\n List.of(\n V2ChatRequestDocumentsItem.of(\n \"↓ Skip to Main Content\\n\\n\"\n + \"Music industry – One step\"\n + \" closer to being\"\n + \" accurate\\n\\n\"\n + \"CSPC: Backstreet Boys\"\n + \" Popularity Analysis\\n\\n\"\n + \"Hernán Lopez Posted on\"\n + \" February 9, 2017 Posted in\"\n + \" CSPC 72 Comments Tagged\"\n + \" with Backstreet Boys, Boy\"\n + \" band\\n\\n\"\n + \"At one point, Backstreet\"\n + \" Boys defined success:\"\n + \" massive albums sales across\"\n + \" the globe, great singles\"\n + \" sales, plenty of chart\"\n + \" topping releases, hugely\"\n + \" hyped tours and tremendous\"\n + \" media coverage.\\n\\n\"\n + \"It is true that they\"\n + \" benefited from\"\n + \" extraordinarily good market\"\n + \" conditions in all markets.\"\n + \" After all, the all-time\"\n + \" record year for the music\"\n + \" business, as far as\"\n + \" revenues in billion dollars\"\n + \" are concerned, was actually\"\n + \" 1999. That is, back when\"\n + \" this five men group was at\"\n + \" its peak.\"),\n V2ChatRequestDocumentsItem.of(\n \"↓ Skip to Main Content\\n\\n\"\n + \"Music industry – One step\"\n + \" closer to being\"\n + \" accurate\\n\\n\"\n + \"CSPC: NSYNC Popularity\"\n + \" Analysis\\n\\n\"\n + \"MJD Posted on February 9,\"\n + \" 2018 Posted in CSPC 27\"\n + \" Comments Tagged with Boy\"\n + \" band, N'Sync\\n\\n\"\n + \"At the turn of the\"\n + \" millennium three teen acts\"\n + \" were huge in the US, the\"\n + \" Backstreet Boys, Britney\"\n + \" Spears and NSYNC. The\"\n + \" latter is the only one we\"\n + \" haven’t study so far. It\"\n + \" took 15 years and Adele to\"\n + \" break their record of 2,4\"\n + \" million units sold of No\"\n + \" Strings Attached in its\"\n + \" first week alone.\\n\\n\"\n + \"It wasn’t a fluke, as the\"\n + \" second fastest selling\"\n + \" album of the Soundscan era\"\n + \" prior 2015, was also theirs\"\n + \" since Celebrity debuted\"\n + \" with 1,88 million units\"\n + \" sold.\"),\n V2ChatRequestDocumentsItem.of(\n \" 1997, 1998, 2000 and 2001 also\"\n + \" rank amongst some of the\"\n + \" very best years.\\n\\n\"\n + \"Yet the way many music\"\n + \" consumers – especially\"\n + \" teenagers and young women’s\"\n + \" – embraced their output\"\n + \" deserves its own chapter.\"\n + \" If Jonas Brothers and more\"\n + \" recently One Direction\"\n + \" reached a great level of\"\n + \" popularity during the past\"\n + \" decade, the type of success\"\n + \" achieved by Backstreet Boys\"\n + \" is in a completely\"\n + \" different level as they\"\n + \" really dominated the\"\n + \" business for a few years\"\n + \" all over the world,\"\n + \" including in some countries\"\n + \" that were traditionally\"\n + \" hard to penetrate for\"\n + \" Western artists.\\n\\n\"\n + \"We will try to analyze the\"\n + \" extent of that hegemony\"\n + \" with this new article with\"\n + \" final results which will\"\n + \" more than surprise many\"\n + \" readers.\"),\n V2ChatRequestDocumentsItem.of(\n \" Was the teen group led by Justin\"\n + \" Timberlake really that big?\"\n + \" Was it only in the US where\"\n + \" they found success? Or were\"\n + \" they a global\"\n + \" phenomenon?\\n\\n\"\n + \"As usual, I’ll be using the\"\n + \" Commensurate Sales to\"\n + \" Popularity Concept in order\"\n + \" to relevantly gauge their\"\n + \" results. This concept will\"\n + \" not only bring you sales\"\n + \" information for all NSYNC‘s\"\n + \" albums, physical and\"\n + \" download singles, as well\"\n + \" as audio and video\"\n + \" streaming, but it will also\"\n + \" determine their true\"\n + \" popularity. If you are not\"\n + \" yet familiar with the CSPC\"\n + \" method, the next page\"\n + \" explains it with a short\"\n + \" video. I fully recommend\"\n + \" watching the video before\"\n + \" getting into the sales\"\n + \" figures.\")))\n .build());\n System.out.println(response);\n }\n}\n"
0 commit comments