File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
src/services/api/controllers Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11[project ]
22name = " brainapi2"
3- version = " 1.6.5 -dev"
3+ version = " 1.6.6 -dev"
44description = " Version 1.x.x of the BrainAPI memory layer."
55authors = [
66 {
name =
" Christian" ,
email =
" [email protected] " }
Original file line number Diff line number Diff line change 99"""
1010
1111import asyncio
12+
13+ from pydantic import BaseModel
1214from src .services .data .main import data_adapter
1315
1416
@@ -20,9 +22,17 @@ async def get_brains_list():
2022 return result
2123
2224
23- async def create_new_brain (brain_id : str ):
25+ class CreateBrainRequest (BaseModel ):
26+ """
27+ Request body for the create brain endpoint.
28+ """
29+
30+ brain_id : str
31+
32+
33+ async def create_new_brain (request : CreateBrainRequest ):
2434 """
2535 Create a new brain
2636 """
27- result = await asyncio .to_thread (data_adapter .create_brain , brain_id )
37+ result = await asyncio .to_thread (data_adapter .create_brain , request . brain_id )
2838 return result
You can’t perform that action at this time.
0 commit comments