You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ Crawl a site to generate knowledge files to create your own custom GPT from one
15
15
-[Running in a container with Docker](#running-in-a-container-with-docker)
16
16
-[Running as a CLI](#running-as-a-cli)
17
17
-[Development](#development)
18
+
-[Running as an API](#running-as-an-api)
18
19
-[Upload your data to OpenAI](#upload-your-data-to-openai)
19
20
-[Create a custom GPT](#create-a-custom-gpt)
20
21
-[Create a custom assistant](#create-a-custom-assistant)
@@ -103,6 +104,18 @@ npm start
103
104
104
105
To obtain the `output.json` with a containerized execution, go into the `containerapp` directory and modify the `config.ts` as shown above. The `output.json`file should be generated in the data folder. Note: the `outputFileName` property in the `config.ts` file in the `containerapp` directory is configured to work with the container.
105
106
107
+
#### Running as an API
108
+
109
+
To run the app as a API server you will need to do an `npm install` to install the dependencies. The server is written in Express JS.
110
+
111
+
To run the server.
112
+
113
+
`npm run start:server` to start the server. The server runs by default on port 3000.
114
+
115
+
You can use the endpoint `/crawl` with the post request body of config json to run the crawler. The api docs are served on the endpoint `/api-docs` and are served using swagger.
116
+
117
+
To modify the environment you can copy over the `.env.example` to `.env` and set your values like port, etc. to override the variables for the server.
118
+
106
119
### Upload your data to OpenAI
107
120
108
121
The crawl will generate a file called `output.json` at the root of this project. Upload that [to OpenAI](https://platform.openai.com/docs/assistants/overview) to create your custom assistant or custom GPT.
0 commit comments