Browse Source

[REST API] Change docker image name and update docs (#901)

Deshraj Yadav 1 year ago
parent
commit
4b8cada873

+ 1 - 1
README.md

@@ -29,7 +29,7 @@ pip install --upgrade embedchain
 To run Embedchain as a REST API server run the following command:
 
 ```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.

+ 4 - 4
docs/api-reference/getting-started.mdx

@@ -2,12 +2,12 @@
 title: "🌍 Getting Started"
 ---
 
-## Quick Start
+## Quickstart
 
 To run Embedchain as a REST API server use,
 
 ```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
@@ -83,7 +83,7 @@ To provide them, you can simply run the docker command with the `-e` flag.
 For example,
 
 ```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`.
@@ -95,7 +95,7 @@ for your app that can sync the data time to time and provide you with the best r
 
 ![My first Pipeline](https://github.com/embedchain/embedchain/assets/73601258/266a66e0-330e-4bb9-aa97-687d826cd3fa)
 
-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/).
 
 ![Create Embedchain API Key](https://github.com/embedchain/embedchain/assets/73601258/791e92cc-4a6f-4740-94c2-f11cce13e93b)
 

+ 2 - 2
docs/rest-api/getting-started.mdx

@@ -7,7 +7,7 @@ title: "🌍 Getting Started"
 To use Embedchain as a REST API service, run the following command:
 
 ```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.
@@ -79,7 +79,7 @@ To add env variables, you can simply run the docker command with the `-e` flag.
 For example,
 
 ```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:

+ 4 - 4
examples/rest-api/README.md

@@ -1,7 +1,7 @@
 ## Single command to rule them all,
 
 ```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,
@@ -14,8 +14,8 @@ DEVELOPMENT=True && python -m main
 Using docker (locally),
 
 ```bash
-docker build -t embedchain/app:rest-api-latest .
-docker run -d --name embedchain -p 8080:8080 embedchain/app:rest-api-latest
-docker image push embedchain/app:rest-api-latest
+docker build -t embedchain/rest-api:latest .
+docker run -d --name embedchain -p 8080:8080 embedchain/rest-api:latest
+docker image push embedchain/rest-api:latest
 ```
 

+ 1 - 1
examples/rest-api/utils.py

@@ -15,7 +15,7 @@ def generate_error_message_for_api_keys(error: ValueError) -> str:
     if missing_keys:
         missing_keys_str = ", ".join(missing_keys)
         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:
         return "Unknown error occurred."