add the rest of schemas, update prompts
This commit is contained in:
@@ -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"]
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user