Skip to content

Commit

Permalink
Remove browser build
Browse files Browse the repository at this point in the history
  • Loading branch information
zachey01 committed Aug 20, 2024
1 parent 761eae3 commit e9602c5
Show file tree
Hide file tree
Showing 6 changed files with 598 additions and 2,557 deletions.
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ This package can be used in Node.js or Browser environments.
- [Using NPM](#using-npm)
- [Using Yarn](#using-yarn)
- [Using Bun](#using-bun)
- [Using CDN](#using-cdn)
- [🧩 Examples](#-examples)
- [📤 Chat Completion](#-chat-completion)
- [⚙️ Basic Usage](#️-basic-usage)
Expand Down Expand Up @@ -70,14 +69,6 @@ yarn add gpt4js
bun add gpt4js
```

<a id="using-cdn"></a>

### Using CDN

```html
<script src="https://cdn.jsdelivr.net/npm/gpt4js/dist/gpt4js.min.js"></script>
```

<a id="examples"></a>

# 🧩 Examples
Expand All @@ -104,7 +95,6 @@ const getGPT4js = require("gpt4js");
const GPT4js = await getGPT4js();
// ESM
import GPT4js from "gpt4js";
// In browsers use <script> tag

const messages = [{ role: "user", content: "hi!" }];
const options = {
Expand Down
1 change: 0 additions & 1 deletion dist/gpt4js.min.js

This file was deleted.

3 changes: 0 additions & 3 deletions index.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
"use strict";
module.exports = async function () {
const { default: GPT4js } = await import("./index.js");
if (typeof window !== "undefined") {
window.GPT4js = GPT4js;
}
return GPT4js;
};
4 changes: 0 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
"use strict";
import GPT4js from "./src/providers.js";

if (typeof window !== "undefined") {
window.GPT4js = GPT4js;
}

export default GPT4js;
Loading

0 comments on commit e9602c5

Please sign in to comment.