giving functions to use for AI

This commit is contained in:
2025-09-09 09:57:03 +03:00
parent fb424dfa19
commit 3e18a04d55
6 changed files with 116 additions and 6 deletions

View File

@@ -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):