mirror of
https://github.com/Significant-Gravitas/AutoGPT-Code-Ability.git
synced 2026-11-10 16:11:28 -10:00
* Fix unimplemented function semantic --------- Co-authored-by: majdyz <[email protected]> Co-authored-by: majdyz <[email protected]> Co-authored-by: Swifty <[email protected]>
41 lines
803 B
Python
41 lines
803 B
Python
from typing import Dict, List
|
|
|
|
from prisma.models import APIRouteSpec
|
|
from prisma.models import Function as FunctionDBModel
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class Package(BaseModel):
|
|
package_name: str
|
|
version: str | None = None
|
|
specifier: str | None = None
|
|
|
|
|
|
class FunctionDef(BaseModel):
|
|
name: str
|
|
args: str
|
|
return_type: str
|
|
is_implemented: bool
|
|
function_template: str
|
|
function_code: str
|
|
|
|
|
|
class GeneratedFunctionResponse(BaseModel):
|
|
function_id: str | None = None
|
|
|
|
function_name: str
|
|
api_route_spec: APIRouteSpec
|
|
template: str
|
|
|
|
rawCode: str
|
|
|
|
packages: List[Package]
|
|
imports: List[str]
|
|
functionCode: str
|
|
|
|
functions: Dict[str, FunctionDef] | None = None
|
|
|
|
|
|
class ApplicationGraphs(BaseModel):
|
|
code_graphs: List[FunctionDBModel]
|