ReadFileSchema is the OpenAI tool definition for read_file. The description nudges the model toward read_file over `cat` so it stops piping source through the shell just to look at it.
()
| 33 | // nudges the model toward read_file over `cat` so it stops piping source |
| 34 | // through the shell just to look at it. |
| 35 | func ReadFileSchema() map[string]any { |
| 36 | return map[string]any{ |
| 37 | "type": "function", |
| 38 | "function": map[string]any{ |
| 39 | "name": ReadFileName, |
| 40 | "description": "Read a file and return its contents. Prefer this over `cat`/`sed` in bash for inspecting a file - no shell quoting, exact bytes. Output over 6k tokens is truncated to first+last 2k; for a slice of a large file use bash with sed/grep/head/tail.", |
| 41 | "parameters": map[string]any{ |
| 42 | "type": "object", |
| 43 | "properties": map[string]any{ |
| 44 | "path": map[string]any{ |
| 45 | "type": "string", |
| 46 | "description": "Absolute or relative file path.", |
| 47 | }, |
| 48 | }, |
| 49 | "required": []string{"path"}, |
| 50 | }, |
| 51 | }, |
| 52 | } |
| 53 | } |
no outgoing calls