repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | openapi: post /create |
| #3 | --- |
| #4 | |
| #5 | <RequestExample> |
| #6 | |
| #7 | ```bash Request |
| #8 | curl --request POST \ |
| #9 | --url http://localhost:8080/create?app_id=app1 \ |
| #10 | -F "config=@/path/to/config.yaml" |
| #11 | ``` |
| #12 | |
| #13 | </RequestExample> |
| #14 | |
| #15 | <ResponseExample> |
| #16 | |
| #17 | ```json Response |
| #18 | { "response": "App created successfully. App ID: app1" } |
| #19 | ``` |
| #20 | |
| #21 | </ResponseExample> |
| #22 | |
| #23 | By default we will use the opensource **gpt4all** model to get started. You can also specify your own config by uploading a config YAML file. |
| #24 | |
| #25 | For example, create a `config.yaml` file (adjust according to your requirements): |
| #26 | |
| #27 | ```yaml |
| #28 | app: |
| #29 | config: |
| #30 | id: "default-app" |
| #31 | |
| #32 | llm: |
| #33 | provider: openai |
| #34 | config: |
| #35 | model: "gpt-4o-mini" |
| #36 | temperature: 0.5 |
| #37 | max_tokens: 1000 |
| #38 | top_p: 1 |
| #39 | stream: false |
| #40 | prompt: | |
| #41 | Use the following pieces of context to answer the query at the end. |
| #42 | If you don't know the answer, just say that you don't know, don't try to make up an answer. |
| #43 | |
| #44 | $context |
| #45 | |
| #46 | Query: $query |
| #47 | |
| #48 | Helpful Answer: |
| #49 | |
| #50 | vectordb: |
| #51 | provider: chroma |
| #52 | config: |
| #53 | collection_name: "rest-api-app" |
| #54 | dir: db |
| #55 | allow_reset: true |
| #56 | |
| #57 | embedder: |
| #58 | provider: openai |
| #59 | config: |
| #60 | model: "text-embedding-ada-002" |
| #61 | ``` |
| #62 | |
| #63 | To learn more about custom configurations, check out the [custom configurations docs](https://docs.embedchain.ai/advanced/configuration). To explore more examples of config yamls for embedchain, visit [embedchain/configs](https://github.com/embedchain/embedchain/tree/main/configs). |
| #64 | |
| #65 | Now, you can upload this config file in the request body. |
| #66 | |
| #67 | For example, |
| #68 | |
| #69 | ```bash Request |
| #70 | curl --request POST \ |
| #71 | --url http://localhost:8080/create?app_id=my-app \ |
| #72 | -F "config=@/path/to/config.yaml" |
| #73 | ``` |
| #74 | |
| #75 | **Note:** To use custom models, an **API key** might be required. Refer to the table below to determine the necessary API key for your provider. |
| #76 | |
| #77 | | Keys | Providers | |
| #78 | | -------------------------- | ------------------------------ | |
| #79 | | `OPENAI_API_KEY ` | OpenAI, Azure OpenAI, Jina etc | |
| #80 | | `OPENAI_API_TYPE` | Azure OpenAI | |
| #81 | | `OPENAI_API_BASE` | Azure OpenAI | |
| #82 | | `OPENAI_API_VERSION` | Azure OpenAI | |
| #83 | | `COHERE_API_KEY` | Cohere | |
| #84 | | `TOGETHER_API_KEY` | Together | |
| #85 | | `ANTHROPIC_API_KEY` | Anthropic | |
| #86 | | `JINACHAT_API_KEY` | Jina | |
| #87 | | `HUGGINGFACE_ACCESS_TOKEN` | Huggingface | |
| #88 | | `REPLICATE_API_TOKEN` | LLAMA2 | |
| #89 | |
| #90 | To add env variables, you can simply run the docker command with the `-e` flag. |
| #91 | |
| #92 | For example, |
| #93 | |
| #94 | ```bash |
| #95 | docker run --name embedchain -p 8080:8080 -e OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> embedchain/rest-api:latest |
| #96 | ``` |