@@ -9273,22 +9273,22 @@ paths:
92739273 - code-samples:
92749274 - sdk: go
92759275 name: Cohere Go SDK
9276- code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient()\n\n\tresp, err := co.Datasets.Get(context .TODO(), \"dataset_id\" )\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n"
9276+ code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\ tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient()\n\n\tresp, err := co.Datasets.List(\n\t\tcontext .TODO(),\n\t\t&cohere.DatasetsListRequest{} )\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n"
92779277 - sdk: python
92789278 name: Sync
9279- code: "import cohere\n\nco = cohere.Client()\n\n# get dataset \nresponse = co.datasets.get(id=\"<<datasetId>>\" )\n\nprint(response)\n"
9279+ code: "import cohere\n\nco = cohere.Client()\n\n# get list of datasets \nresponse = co.datasets.list( )\n\nprint(response)\n"
92809280 - sdk: python
92819281 name: Async
9282- code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n response = await co.datasets.get(id=\"<<datasetId>>\" )\n\n print(response)\n\n\nasyncio.run(main())\n"
9282+ code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n response = await co.datasets.list( )\n\n print(response)\n\n\nasyncio.run(main())\n"
92839283 - sdk: java
92849284 name: Cohere java SDK
9285- code: "/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.types.DatasetsGetResponse;\n\npublic class DatasetGet {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n DatasetsGetResponse response = cohere.datasets().get(\"dataset_id\" );\n\n System.out.println(response);\n }\n}\n"
9285+ code: "/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.types.DatasetsGetResponse;\n\npublic class DatasetGet {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n DatasetsGetResponse response = cohere.datasets().list( );\n\n System.out.println(response);\n }\n}\n"
92869286 - sdk: typescript
92879287 name: Cohere TypeScript SDK
9288- code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({});\n\n(async () => {\n const datasets = await cohere.datasets.get('<<datasetId>>' );\n\n console.log(datasets);\n})();\n"
9288+ code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({});\n\n(async () => {\n const datasets = await cohere.datasets.list( );\n\n console.log(datasets);\n})();\n"
92899289 - sdk: curl
92909290 name: cURL
9291- code: "curl --request GET \\\n --url https://api.cohere.com/v1/datasets \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\""
9291+ code: "curl --request GET \\\n --url https://api.cohere.com/v1/datasets \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"\n "
92929292 /v1/datasets/usage:
92939293 get:
92949294 tags:
@@ -9440,7 +9440,7 @@ paths:
94409440 code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({});\n\n(async () => {\n const datasets = await cohere.datasets.get('<<datasetId>>');\n\n console.log(datasets);\n})();\n"
94419441 - sdk: curl
94429442 name: cURL
9443- code: "curl --request GET \\\n --url https://api.cohere.com/v1/datasets \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\""
9443+ code: "curl --request GET \\\n --url https://api.cohere.com/v1/datasets/id \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"\n "
94449444 delete:
94459445 tags:
94469446 - /datasets
0 commit comments