Skip to content

Commit

Permalink
Release 0.0.1-beta10
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Sep 4, 2024
1 parent ac88ac1 commit 70a8ea8
Show file tree
Hide file tree
Showing 125 changed files with 1,562 additions and 933 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ Instantiate and use the client with the following:
import { GooeyClient } from "gooeyai";

const client = new GooeyClient({ apiKey: "YOUR_API_KEY" });
await client.copilot();
await client.animate({
animationPrompts: [
{
frame: "frame",
prompt: "prompt",
},
],
});
```

## Request And Response Types
Expand All @@ -44,7 +51,7 @@ will be thrown.
import { GooeyError } from "gooeyai";

try {
await client.copilot(...);
await client.animate(...);
} catch (err) {
if (err instanceof GooeyError) {
console.log(err.statusCode);
Expand All @@ -71,7 +78,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
Use the `maxRetries` request option to configure this behavior.

```typescript
const response = await client.copilot(..., {
const response = await client.animate(..., {
maxRetries: 0 // override maxRetries at the request level
});
```
Expand All @@ -81,7 +88,7 @@ const response = await client.copilot(..., {
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.

```typescript
const response = await client.copilot(..., {
const response = await client.animate(..., {
timeoutInSeconds: 30 // override timeout to 30s
});
```
Expand All @@ -92,7 +99,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa

```typescript
const controller = new AbortController();
const response = await client.copilot(..., {
const response = await client.animate(..., {
abortSignal: controller.signal
});
controller.abort(); // aborts the request
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gooeyai",
"version": "0.0.1-beta9",
"version": "0.0.1-beta10",
"private": false,
"repository": "https://github.com/GooeyAI/typescript-sdk",
"main": "./index.js",
Expand Down
Loading

0 comments on commit 70a8ea8

Please sign in to comment.