Skip to content

Commit

Permalink
Fixed breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cszsol committed Nov 20, 2024
1 parent 3416a0f commit 8a0bc33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions swarm_copy/tools/bluenaas_memodel_getall.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class InputMEModelGetAll(BaseModel):
page_size: int = Field(
default=20, description="Number of results returned by the API."
)
model_type: Literal["single-neuron-simulation", "synaptome-simulation"] = Field(
simulation_type: Literal["single-neuron-simulation", "synaptome-simulation"] = Field(
default="single-neuron-simulation",
description="Type of simulation to retrieve.",
)
Expand All @@ -55,7 +55,7 @@ async def arun(self) -> PaginatedResponseUnionMEModelResponseSynaptomeModelRespo
response = await self.metadata.httpx_client.get(
url=f"{self.metadata.bluenaas_url}/neuron-model/{self.metadata.vlab_id}/{self.metadata.project_id}/me-models",
params={
"simulation_type": self.input_schema.model_type,
"simulation_type": self.input_schema.simulation_type,
"offset": self.input_schema.offset,
"page_size": self.input_schema.page_size,
},
Expand Down
4 changes: 2 additions & 2 deletions swarm_copy/tools/bluenaas_memodel_getone.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MEModelGetOneMetadata(BaseMetadata):
class InputMEModelGetOne(BaseModel):
"""Inputs for the BlueNaaS single-neuron simulation."""

model_id: str = Field(
simulation_id: str = Field(
description="ID of the model to retrieve. Should be an https link."
)

Expand All @@ -45,7 +45,7 @@ async def arun(self) -> MEModelResponse:
)

response = await self.metadata.httpx_client.get(
url=f"{self.metadata.bluenaas_url}/neuron-model/{self.metadata.vlab_id}/{self.metadata.project_id}/{quote_plus(self.input_schema.model_id)}",
url=f"{self.metadata.bluenaas_url}/neuron-model/{self.metadata.vlab_id}/{self.metadata.project_id}/{quote_plus(self.input_schema.simulation_id)}",
headers={"Authorization": f"Bearer {self.metadata.token}"},
)

Expand Down
3 changes: 2 additions & 1 deletion swarm_copy/tools/traces_tool.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Traces tool."""

import logging
from pathlib import Path
from typing import Any, ClassVar

from pydantic import BaseModel, Field
Expand Down Expand Up @@ -46,7 +47,7 @@ class GetTracesMetadata(BaseMetadata):
knowledge_graph_url: str
token: str
trace_search_size: int
brainregion_path: str
brainregion_path: str | Path


class GetTracesTool(BaseTool):
Expand Down

0 comments on commit 8a0bc33

Please sign in to comment.