Skip to content

Commit

Permalink
use ai fetch and remove types from this package
Browse files Browse the repository at this point in the history
  • Loading branch information
cfortuner committed Oct 25, 2024
1 parent b64119d commit 70888f2
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 407 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"ky": "^1.7.2"
"ky": "^1.7.2",
"ai-fetch": "file:../ai-fetch"
},
"devDependencies": {
"@dexaai/eslint-config": "^1.3.6",
Expand Down
11 changes: 11 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

174 changes: 0 additions & 174 deletions src/errors.ts

This file was deleted.

106 changes: 0 additions & 106 deletions src/fetch-api.ts

This file was deleted.

24 changes: 12 additions & 12 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
export {
export { OpenAIClient, type ConfigOpts } from './openai-client.js';
export type {
APIConnectionError,
APIConnectionTimeoutError,
APIError,
APIUserAbortError,
AuthenticationError,
BadRequestError,
ConflictError,
InternalServerError,
NotFoundError,
OpenAIError,
PermissionDeniedError,
RateLimitError,
UnprocessableEntityError,
} from './errors.js';
export type { ConfigOpts } from './openai-client.js';
export { OpenAIClient } from './openai-client.js';
export type {
ChatMessage,
ChatParams,
ChatResponse,
ChatStreamChunk,
ChatStreamParams,
ChatStreamResponse,
CompletionParams,
CompletionResponse,
CompletionStreamParams,
CompletionStreamResponse,
ConflictError,
EmbeddingParams,
EmbeddingResponse,
InternalServerError,
NotFoundError,
OpenAIError,
PermissionDeniedError,
RateLimitError,
UnprocessableEntityError,
} from 'ai-fetch';
export type {
SpeechParams,
SpeechResponse,
} from './types.js';
Loading

0 comments on commit 70888f2

Please sign in to comment.