Move files
This commit is contained in:
parent
d2af1b8151
commit
f160b07163
1 changed files with 104 additions and 88 deletions
12
src/great_ai/helper/get_function_metadata_store.py
Normal file
12
src/great_ai/helper/get_function_metadata_store.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from typing import Any, Callable, cast
|
||||
|
||||
from ..views.function_metadata import FunctionMetadata
|
||||
|
||||
|
||||
def get_function_metadata_store(func: Callable[..., Any]) -> FunctionMetadata:
|
||||
any_func = cast(Any, func)
|
||||
|
||||
if not hasattr(any_func, "_great_ai_metadata"):
|
||||
any_func._great_ai_metadata = FunctionMetadata()
|
||||
|
||||
return any_func._great_ai_metadata
|
||||
Loading…
Reference in a new issue