add the rest of schemas, update prompts

This commit is contained in:
2026-03-28 17:45:23 +01:00
parent 84196b582f
commit b3d068edf9
5 changed files with 82 additions and 5 deletions
+21 -2
View File
@@ -1,5 +1,5 @@
import os
from google.genai import types
def get_file_content(working_directory, file_path):
abs_dir_path = os.path.abspath(working_directory)
@@ -18,4 +18,23 @@ def get_file_content(working_directory, file_path):
file_content_string += f'[...File "{file_path}" truncated at {MAX_CHARS} characters]'
except Exception as e:
return f"Error: {e}"
return file_content_string
return file_content_string
schema_get_file_content = types.FunctionDeclaration(
name="get_file_content",
description="Open and read file content",
parameters=types.Schema(
type=types.Type.OBJECT,
properties={
"working_directory": types.Schema(
type=types.Type.STRING,
description="Directory path to list files from, relative to the working directory (default is the working directory itself)",
),
"file_path": types.Schema(
type=types.Type.STRING,
description="File path",
),
},
required=["file_path"]
),
)