From cc705b4e41a1f9ad7e6f19fbfe9e6d305eef76e8 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Thu, 9 Jan 2025 10:02:26 -0500 Subject: [PATCH 1/5] Split sentry envs --- eve/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eve/__init__.py b/eve/__init__.py index 919cd83..bd17463 100644 --- a/eve/__init__.py +++ b/eve/__init__.py @@ -41,9 +41,13 @@ def load_env(db): # start sentry sentry_dsn = os.getenv("SENTRY_DSN") + sentry_env = "production" if db == "PROD" else "staging" if sentry_dsn: sentry_sdk.init( - dsn=sentry_dsn, traces_sample_rate=1.0, profiles_sample_rate=1.0 + dsn=sentry_dsn, + traces_sample_rate=1.0, + profiles_sample_rate=1.0, + environment=sentry_env, ) # load api keys From 584a5fc89e5c0982d54443ac9554f27299255bec Mon Sep 17 00:00:00 2001 From: genekogan Date: Thu, 9 Jan 2025 09:16:33 -0800 Subject: [PATCH 2/5] task args not args --- eve/task.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eve/task.py b/eve/task.py index b1e1f4c..fb1fdb1 100644 --- a/eve/task.py +++ b/eve/task.py @@ -133,6 +133,8 @@ async def _task_handler(func, *args, **kwargs): # Run both functions concurrently main_task = func(*args[:-1], task.parent_tool or task.tool, task_args) preprocess_task = _preprocess_task(task) + + # preprocess_task is just a stub. it will allow us to parallelize pre-processing tasks that dont want to hold up the main task result, preprocess_result = await asyncio.gather(main_task, preprocess_task) if output_type in ["image", "video", "audio", "lora"]: @@ -141,9 +143,9 @@ async def _task_handler(func, *args, **kwargs): for output in result["output"]: # name = preprocess_result.get("name") or task_args.get("prompt") or args.get("text_input") - name = task_args.get("prompt") or args.get("text_input") + name = task_args.get("prompt") or task_args.get("text_input") if not name: - name = args.get("interpolation_prompts") or args.get("interpolation_texts") + name = task_args.get("interpolation_prompts") or task_args.get("interpolation_texts") if name: name = " to ".join(name) new_creation = Creation( From bc084ad14996edfa76a7eb18859966ad679ccf2e Mon Sep 17 00:00:00 2001 From: xander Date: Thu, 9 Jan 2025 18:22:00 +0100 Subject: [PATCH 3/5] update tooltip for flux trainer --- eve/tools/flux_trainer/api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eve/tools/flux_trainer/api.yaml b/eve/tools/flux_trainer/api.yaml index 3f7583c..ef684ab 100644 --- a/eve/tools/flux_trainer/api.yaml +++ b/eve/tools/flux_trainer/api.yaml @@ -22,7 +22,7 @@ parameters: items: type: image label: Images - description: Images to train LoRA with + description: Images to train LoRA with (Use at least 5 imgs, 10-20 is even better) required: true min_length: 1 mode: From 9ba8183adceed09a0c4f78741c2d521dd69919bf Mon Sep 17 00:00:00 2001 From: genekogan Date: Thu, 9 Jan 2025 09:25:10 -0800 Subject: [PATCH 4/5] install playwright in dependencies to support websearch tool --- eve/clients/discord/modal_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eve/clients/discord/modal_client.py b/eve/clients/discord/modal_client.py index 1396812..a27dd7e 100644 --- a/eve/clients/discord/modal_client.py +++ b/eve/clients/discord/modal_client.py @@ -21,6 +21,7 @@ .env({"DB": db}) .apt_install("libmagic1", "ffmpeg", "wget") .pip_install_from_pyproject("pyproject.toml") + .run_commands(["playwright install"]) .copy_local_dir("../workflows", "/workflows") ) From 47ff9e5f58f20bb412075ca8e5de35a4541ce052 Mon Sep 17 00:00:00 2001 From: genekogan Date: Thu, 9 Jan 2025 09:32:14 -0800 Subject: [PATCH 5/5] not all tasks produce urls/images --- eve/clients/discord/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eve/clients/discord/client.py b/eve/clients/discord/client.py index f102a1e..de527bd 100644 --- a/eve/clients/discord/client.py +++ b/eve/clients/discord/client.py @@ -152,7 +152,7 @@ async def async_callback(message): result = data.get("result", {}) result["result"] = prepare_result(result["result"]) output = result["result"][0]["output"][0] - url = output["url"] + url = output.get("url") # Get creation ID from the output creation_id = str(output.get("creation")) @@ -170,7 +170,7 @@ async def async_callback(message): await self.send_message( channel, url, reference=reference, view=view ) - else: + elif url: await self.send_message(channel, url, reference=reference) elif update_type == UpdateType.END_PROMPT: