[REST API] Change docker image name and update docs (#901)
This commit is contained in:
@@ -29,7 +29,7 @@ pip install --upgrade embedchain
|
|||||||
To run Embedchain as a REST API server run the following command:
|
To run Embedchain as a REST API server run the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d --name embedchain -p 8080:8080 embedchain/app:rest-api-latest
|
docker run -d --name embedchain -p 8080:8080 embedchain/rest-api:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Navigate to http://0.0.0.0:8080/docs to interact with the API.
|
Navigate to http://0.0.0.0:8080/docs to interact with the API.
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
title: "🌍 Getting Started"
|
title: "🌍 Getting Started"
|
||||||
---
|
---
|
||||||
|
|
||||||
## Quick Start
|
## Quickstart
|
||||||
|
|
||||||
To run Embedchain as a REST API server use,
|
To run Embedchain as a REST API server use,
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d --name embedchain -p 8080:8080 embedchain/app:rest-api-latest
|
docker run -d --name embedchain -p 8080:8080 embedchain/rest-api:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Open up your browser and navigate to http://0.0.0.0:8080/docs to interact with the API. There is a full-fledged Swagger docs playground with all the information
|
Open up your browser and navigate to http://0.0.0.0:8080/docs to interact with the API. There is a full-fledged Swagger docs playground with all the information
|
||||||
@@ -83,7 +83,7 @@ To provide them, you can simply run the docker command with the `-e` flag.
|
|||||||
For example,
|
For example,
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d --name embedchain -p 8080:8080 -e OPENAI_API_KEY=YOUR_API_KEY embedchain/app:rest-api-latest
|
docker run -d --name embedchain -p 8080:8080 -e OPENAI_API_KEY=YOUR_API_KEY embedchain/rest-api:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Cool! This will create a new Embedchain App with the given `app_id`.
|
Cool! This will create a new Embedchain App with the given `app_id`.
|
||||||
@@ -95,7 +95,7 @@ for your app that can sync the data time to time and provide you with the best r
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
To utilize this functionality, visit app.embedchain.ai and create an account. Subsequently, generate a new [API KEY](https://app.embedchain.ai/settings/keys/).
|
To utilize this functionality, visit [app.embedchain.ai](app.embedchain.ai) and create an account. Subsequently, generate a new [API KEY](https://app.embedchain.ai/settings/keys/).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ title: "🌍 Getting Started"
|
|||||||
To use Embedchain as a REST API service, run the following command:
|
To use Embedchain as a REST API service, run the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --name embedchain -p 8080:8080 embedchain/app:rest-api-latest
|
docker run --name embedchain -p 8080:8080 embedchain/rest-api:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Navigate to [http://localhost:8080/docs](http://localhost:8080/docs) to interact with the API. There is a full-fledged Swagger docs playground with all the information about the API endpoints.
|
Navigate to [http://localhost:8080/docs](http://localhost:8080/docs) to interact with the API. There is a full-fledged Swagger docs playground with all the information about the API endpoints.
|
||||||
@@ -79,7 +79,7 @@ To add env variables, you can simply run the docker command with the `-e` flag.
|
|||||||
For example,
|
For example,
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --name embedchain -p 8080:8080 -e OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> embedchain/app:rest-api-latest
|
docker run --name embedchain -p 8080:8080 -e OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> embedchain/rest-api:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
If you run into issues, please feel free to contact us using below links:
|
If you run into issues, please feel free to contact us using below links:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
## Single command to rule them all,
|
## Single command to rule them all,
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d --name embedchain -p 8080:8080 embedchain/app:rest-api-latest
|
docker run -d --name embedchain -p 8080:8080 embedchain/rest-api:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### To run the app locally,
|
### To run the app locally,
|
||||||
@@ -14,8 +14,8 @@ DEVELOPMENT=True && python -m main
|
|||||||
Using docker (locally),
|
Using docker (locally),
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -t embedchain/app:rest-api-latest .
|
docker build -t embedchain/rest-api:latest .
|
||||||
docker run -d --name embedchain -p 8080:8080 embedchain/app:rest-api-latest
|
docker run -d --name embedchain -p 8080:8080 embedchain/rest-api:latest
|
||||||
docker image push embedchain/app:rest-api-latest
|
docker image push embedchain/rest-api:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ def generate_error_message_for_api_keys(error: ValueError) -> str:
|
|||||||
if missing_keys:
|
if missing_keys:
|
||||||
missing_keys_str = ", ".join(missing_keys)
|
missing_keys_str = ", ".join(missing_keys)
|
||||||
return f"""Please set the {missing_keys_str} environment variable(s) when running the Docker container.
|
return f"""Please set the {missing_keys_str} environment variable(s) when running the Docker container.
|
||||||
Example: `docker run -e {missing_keys[0]}=xxx embedchain/app:rest-api-latest`
|
Example: `docker run -e {missing_keys[0]}=xxx embedchain/rest-api:latest`
|
||||||
"""
|
"""
|
||||||
else:
|
else:
|
||||||
return "Unknown error occurred."
|
return "Unknown error occurred."
|
||||||
|
|||||||
Reference in New Issue
Block a user