giving functions to use for AI
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user