Skip to content

Commit

Permalink
release: 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AmAzing129 committed Sep 2, 2024
1 parent 3506d97 commit 55c88ed
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# use-ai-lib

## 0.0.2

### Patch Changes

- feat: version 0.0.2
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-ai-lib",
"version": "0.0.1",
"version": "0.0.2",
"description": "A React hooks library for building AI-powered apps as simple as possible.",
"type": "module",
"source": "src/index.ts",
Expand All @@ -19,13 +19,14 @@
"ci": "pnpm run test",
"test": "vitest",
"lint": "biome check src/**",
"lint:fix": "biome check --write src/**"
"lint:fix": "biome check --write src/**",
"changeset": "changeset",
"release:prepare": "pnpm run lint && pnpm run ci && pnpm run build",
"release": "pnpm run release:prepare && changeset version && changeset publish"
},
"dependencies": {
"@tanstack/react-query": "^5.53.1",
"ai": "^3.3.21",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"ai": "^3.3.21"
},
"devDependencies": {
"@ai-sdk/openai": "^0.0.54",
Expand All @@ -47,6 +48,10 @@
"vitest": "^2.0.5",
"zod": "^3.23.8"
},
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/AmAzing129/use-ai-lib.git"
Expand Down
12 changes: 6 additions & 6 deletions src/hooks/useAIModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ export function useAIModel<D = string>(
return {
data,
regenerate:
fetchText ?? fetchStreamText ?? fetchObject ?? fetchStreamObject,
fetchText || fetchStreamText || fetchObject || fetchStreamObject,
isGenerating:
isTextFetching ??
isStreamTextFetching ??
isObjectFetching ??
isTextFetching ||
isStreamTextFetching ||
isObjectFetching ||
isStreamObjectFetching,
isError:
isTextError ?? isStreamTextError ?? isObjectError ?? isStreamObjectError,
error: textError ?? streamTextError ?? objectError ?? streamObjectError,
isTextError || isStreamTextError || isObjectError || isStreamObjectError,
error: textError || streamTextError || objectError || streamObjectError,
};
}

0 comments on commit 55c88ed

Please sign in to comment.