config.yaml file (adjust according to your requirements):
Request
To add env variables, you can simply run the docker command with the
-e flag.
For example,
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url http://localhost:8080/create?app_id=app1 \
-F "config=@/path/to/config.yaml"
{ "response": "App created successfully. App ID: app1" }
Create a new app using App ID
curl --request POST \
--url http://localhost:8080/create?app_id=app1 \
-F "config=@/path/to/config.yaml"
{ "response": "App created successfully. App ID: app1" }
config.yaml file (adjust according to your requirements):
app:
config:
id: "default-app"
llm:
provider: openai
config:
model: "gpt-3.5-turbo"
temperature: 0.5
max_tokens: 1000
top_p: 1
stream: false
prompt: |
Use the following pieces of context to answer the query at the end.
If you don't know the answer, just say that you don't know, don't try to make up an answer.
$context
Query: $query
Helpful Answer:
vectordb:
provider: chroma
config:
collection_name: "rest-api-app"
dir: db
allow_reset: true
embedder:
provider: openai
config:
model: "text-embedding-ada-002"
curl --request POST \
--url http://localhost:8080/create?app_id=my-app \
-F "config=@/path/to/config.yaml"
| Keys | Providers |
|---|---|
OPENAI_API_KEY | OpenAI, Azure OpenAI, Jina etc |
OPENAI_API_TYPE | Azure OpenAI |
OPENAI_API_BASE | Azure OpenAI |
OPENAI_API_VERSION | Azure OpenAI |
COHERE_API_KEY | Cohere |
TOGETHER_API_KEY | Together |
ANTHROPIC_API_KEY | Anthropic |
JINACHAT_API_KEY | Jina |
HUGGINGFACE_ACCESS_TOKEN | Huggingface |
REPLICATE_API_TOKEN | LLAMA2 |
-e flag.
For example,
docker run --name embedchain -p 8080:8080 -e OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> embedchain/rest-api:latest
Was this page helpful?