-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into get-started
- Loading branch information
Showing
17 changed files
with
143 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
[project] | ||
name = "cohere-developer-experience" | ||
|
||
[tool.poetry] | ||
name = "py-snips" | ||
name = "cohere-developer-experience" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Your Name <[email protected]>"] | ||
readme = "README.md" | ||
package-mode = false | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.11" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
curl --request GET \ | ||
--url https://api.cohere.com/v1/datasets \ | ||
--url https://api.cohere.com/v1/datasets/id \ | ||
--header 'accept: application/json' \ | ||
--header "Authorization: bearer $CO_API_KEY" | ||
--header "Authorization: bearer $CO_API_KEY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
curl --request GET \ | ||
--url https://api.cohere.com/v1/datasets \ | ||
--header 'accept: application/json' \ | ||
--header "Authorization: bearer $CO_API_KEY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"log" | ||
|
||
cohere "github.com/cohere-ai/cohere-go/v2" | ||
client "github.com/cohere-ai/cohere-go/v2/client" | ||
) | ||
|
||
func main() { | ||
co := client.NewClient() | ||
|
||
resp, err := co.Datasets.List( | ||
context.TODO(), | ||
&cohere.DatasetsListRequest{}) | ||
|
||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
log.Printf("%+v", resp) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* (C)2024 */ | ||
import com.cohere.api.Cohere; | ||
import com.cohere.api.resources.datasets.types.DatasetsGetResponse; | ||
|
||
public class DatasetGet { | ||
public static void main(String[] args) { | ||
Cohere cohere = Cohere.builder().clientName("snippet").build(); | ||
|
||
DatasetsGetResponse response = cohere.datasets().list(); | ||
|
||
System.out.println(response); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const { CohereClient } = require('cohere-ai'); | ||
|
||
const cohere = new CohereClient({}); | ||
|
||
(async () => { | ||
const datasets = await cohere.datasets.list(); | ||
|
||
console.log(datasets); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import cohere | ||
import asyncio | ||
|
||
co = cohere.AsyncClient() | ||
|
||
|
||
async def main(): | ||
response = await co.datasets.list() | ||
|
||
print(response) | ||
|
||
|
||
asyncio.run(main()) |
Oops, something went wrong.