giving functions to use for AI
This commit is contained in:
@@ -1,4 +1,24 @@
|
||||
import os
|
||||
from google.genai import types
|
||||
|
||||
schema_write_file = types.FunctionDeclaration(
|
||||
name="write_file",
|
||||
description="Writes or overwrites file contents within the working directory.",
|
||||
parameters=types.Schema(
|
||||
type=types.Type.OBJECT,
|
||||
properties={
|
||||
"file_path": types.Schema(
|
||||
type=types.Type.STRING,
|
||||
description="Path to the file relative to the working directory.",
|
||||
),
|
||||
"content": types.Schema(
|
||||
type=types.Type.STRING,
|
||||
description="The text content to write into the file.",
|
||||
),
|
||||
},
|
||||
required=["file_path", "content"],
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def write_file(working_directory, file_path, content):
|
||||
|
||||
Reference in New Issue
Block a user