diff --git a/prompting/tasks/task_sending.py b/prompting/tasks/task_sending.py index 2635d93e7..7dfb55d2c 100644 --- a/prompting/tasks/task_sending.py +++ b/prompting/tasks/task_sending.py @@ -47,15 +47,25 @@ async def collect_responses(task: BaseTextTask) -> DendriteResponseEvent | None: logger.warning("No available miners. This should already have been caught earlier.") return - body = { - "seed": task.seed, - "sampling_parameters": task.sampling_params, - "task": task.__class__.__name__, - "model": task.llm_model_id, - "messages": [ - {"role": "user", "content": task.query}, - ], - } + if isinstance(task, InferenceTask): + body = { + "seed": task.seed, + "sampling_parameters": task.sampling_params, + "task": task.__class__.__name__, + "model": task.llm_model_id, + "messages": task.query, + } + else: + body = { + "seed": task.seed, + "sampling_parameters": task.sampling_params, + "task": task.__class__.__name__, + "model": task.llm_model_id, + "messages": [ + {"role": "user", "content": task.query}, + ], + } + stream_results = await query_miners(uids, body) logger.debug(f"🔍 Collected responses from {len(stream_results)} miners") diff --git a/pyproject.toml b/pyproject.toml index 8fc753fd0..b4adb1e16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "prompting" -version = "2.16.1" +version = "2.16.2" description = "Subnetwork 1 runs on Bittensor and is maintained by Macrocosmos. It's an effort to create decentralised AI" authors = ["Kalei Brady, Dmytro Bobrenko, Felix Quinque, Steffen Cruz, Richard Wardle"] readme = "README.md"