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,19 @@
import os
from google.genai import types
schema_get_files_info = types.FunctionDeclaration(
name="get_files_info",
description="Lists files in the specified directory along with their sizes, constrained to the working directory.",
parameters=types.Schema(
type=types.Type.OBJECT,
properties={
"directory": types.Schema(
type=types.Type.STRING,
description="The directory to list files from, relative to the working directory. If not provided, lists files in the working directory itself.",
),
},
),
)
def get_files_info(working_directory, directory="."):
try: