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,5 +1,21 @@
import os
from functions.config import MAX_FILE_CONTENT_CHARS
from google.genai import types
schema_get_file_content = types.FunctionDeclaration(
name="get_file_content",
description="Reads and returns the contents of a file, truncated if too large, constrained to 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.",
),
},
required=["file_path"],
),
)
def get_file_content(working_directory, file_path):