Skip to content

Commit

Permalink
put auto reload behind args so we don't get warning, update k8 docs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeLalor authored Jul 19, 2024
1 parent 8131884 commit 33cd01d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
29 changes: 18 additions & 11 deletions k8s-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,26 @@ We develop on a Mac, so we have the following instructions for Mac users. If yo

* Install your secrets

A secret with the needed credentials for your Eidolon deployment. The name of the secret is `eidolon`.
A secret with the needed credentials for your Eidolon deployment. The name of the secret is `eidolon`.

See the [Eidolon documentation](https://www.eidolonai.com) for more information on what keys you need.
However, typically this will be a secret with the following keys:
- `OLLAMA_URL` - the URL for your Ollama deployment if you are using ollama.
- `OPENAI_API_KEY` - your OpenAI API key if you are using OpenAI.
- `MISTRAL_API_KEY` - your Mistral API key if you are using Mistral.
- `ANTHROPIC_API_KEY` - your Anthropic API key if you are using Anthropic.
See the [Eidolon documentation](https://www.eidolonai.com) for more information on what keys you need.
However, typically this will be a secret with the following keys:
- `OLLAMA_URL` - the URL for your Ollama deployment if you are using ollama.
- `OPENAI_API_KEY` - your OpenAI API key if you are using OpenAI.
- `MISTRAL_API_KEY` - your Mistral API key if you are using Mistral.
- `ANTHROPIC_API_KEY` - your Anthropic API key if you are using Anthropic.

If you already have a .env file with these keys, you can create the secret with the following command:
```sh
kubectl create secret generic eidolon --from-env-file=<location of your env file>/.env
```
If you already have a .env file with these keys, you can create the secret with the following command:
```sh
kubectl create secret generic eidolon --from-env-file=<location of your env file>/.env
```

⚠️ To use the secret in your deployment, you need to add the following to your deployment yaml file's `spec`:
```yaml
envFrom:
- secretRef:
name: eidolon
```
* Install the eidolon operator
```sh
Expand Down
13 changes: 8 additions & 5 deletions sdk/eidolon_ai_sdk/bin/agent_http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,20 @@ def parse_args():

def main():
# Run the server
path_ = [os.path.dirname(p) for p in args.yaml_path]
path_.append(".")
kwargs = {}
if args.reload:
kwargs["reload"] = True
kwargs["reload_dirs"] = [".", *(os.path.dirname(p) for p in args.yaml_path)]
kwargs["reload_includes"] = ["*.yml", "*.yaml", "*.py"]

uvicorn.run(
"eidolon_ai_sdk.bin.agent_http_server:app",
host="0.0.0.0",
port=args.port,
log_level=log_level_str,
reload=args.reload,
reload_dirs=path_,
reload_includes=["*.yml", "*.yaml", "*.py"],
**kwargs
)


if __name__ == "__main__":
main()

0 comments on commit 33cd01d

Please sign in to comment.