-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ export const response = (ctx) => { | |
|
||
exports[`generation route all scalar types 2`] = ` | ||
"export function request(ctx) { | ||
const toolConfig = {\\"tools\\":[{\\"toolSpec\\":{\\"name\\":\\"responseType\\",\\"description\\":\\"Generate a response type for the given field\\",\\"inputSchema\\":{\\"json\\":{\\"type\\":\\"object\\",\\"properties\\":{\\"value\\":{\\"type\\":\\"object\\",\\"properties\\":{\\"int\\":{\\"type\\":\\"number\\",\\"description\\":\\"A signed 32-bit integer value.\\"},\\"float\\":{\\"type\\":\\"number\\",\\"description\\":\\"An IEEE 754 floating point value.\\"},\\"string\\":{\\"type\\":\\"string\\",\\"description\\":\\"A UTF-8 character sequence.\\"},\\"id\\":{\\"type\\":\\"string\\",\\"description\\":\\"A unique identifier for an object. This scalar is serialized like a String but isn't meant to be human-readable.\\"},\\"boolean\\":{\\"type\\":\\"boolean\\",\\"description\\":\\"A boolean value.\\"},\\"awsjson\\":{\\"type\\":\\"string\\",\\"description\\":\\"A JSON string. Any valid JSON construct is automatically parsed and loaded in the resolver code as maps, lists, or scalar values rather than as the literal input strings. Unquoted strings or otherwise invalid JSON result in a GraphQL validation error.\\"},\\"awsemail\\":{\\"type\\":\\"string\\",\\"description\\":\\"An email address in the format local-part@domain-part as defined by RFC 822.\\",\\"pattern\\":\\"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\\\\\.[a-zA-Z]{2,}$\\"},\\"awsdate\\":{\\"type\\":\\"string\\",\\"description\\":\\"An extended ISO 8601 date string in the format YYYY-MM-DD.\\",\\"pattern\\":\\"^\\\\\\\\d{4}-d{2}-d{2}$\\"},\\"awstime\\":{\\"type\\":\\"string\\",\\"description\\":\\"An extended ISO 8601 time string in the format hh:mm:ss.sss.\\",\\"pattern\\":\\"^\\\\\\\\d{2}:\\\\\\\\d{2}:\\\\\\\\d{2}\\\\\\\\.\\\\\\\\d{3}$\\"},\\"awsdatetime\\":{\\"type\\":\\"string\\",\\"description\\":\\"An extended ISO 8601 date and time string in the format YYYY-MM-DDThh:mm:ss.sssZ.\\",\\"pattern\\":\\"^\\\\\\\\d{4}-\\\\\\\\d{2}-\\\\\\\\d{2}T\\\\\\\\d{2}:\\\\\\\\d{2}:\\\\\\\\d{2}\\\\\\\\.\\\\\\\\d{3}Z$\\"},\\"awstimestamp\\":{\\"type\\":\\"string\\",\\"description\\":\\"An integer value representing the number of seconds before or after 1970-01-01-T00:00Z.\\",\\"pattern\\":\\"^\\\\\\\\d+$\\"},\\"awsphone\\":{\\"type\\":\\"string\\",\\"description\\":\\"A phone number. This value is stored as a string. Phone numbers can contain either spaces or hyphens to separate digit groups. Phone numbers without a country code are assumed to be US/North American numbers adhering to the North American Numbering Plan (NANP).\\",\\"pattern\\":\\"^\\\\\\\\d{3}-d{3}-d{4}$\\"},\\"awsurl\\":{\\"type\\":\\"string\\",\\"description\\":\\"A URL as defined by RFC 1738. For example, https://www.amazon.com/dp/B000NZW3KC/ or mailto:[email protected]. URLs must contain a schema (http, mailto) and can't contain two forward slashes (//) in the path part.\\",\\"pattern\\":\\"^(https?|mailto)://[^s/$.?#].[^s]*$\\"},\\"awsipaddress\\":{\\"type\\":\\"string\\",\\"description\\":\\"A valid IPv4 or IPv6 address. IPv4 addresses are expected in quad-dotted notation (123.12.34.56). IPv6 addresses are expected in non-bracketed, colon-separated format (1a2b:3c4b::1234:4567). You can include an optional CIDR suffix (123.45.67.89/16) to indicate subnet mask.\\",\\"pattern\\":\\"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:/d{1,2})?$|^(?:(?:[0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,7}:|(?:[0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,5}(?::[0-9a-fA-F]{1,4}){1,2}|(?:[0-9a-fA-F]{1,4}:){1,4}(?::[0-9a-fA-F]{1,4}){1,3}|(?:[0-9a-fA-F]{1,4}:){1,3}(?::[0-9a-fA-F]{1,4}){1,4}|(?:[0-9a-fA-F]{1,4}:){1,2}(?::[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:(?:(?::[0-9a-fA-F]{1,4}){1,6})|:(?:(?::[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(?::[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(?:ffff(?::0{1,4}){0,1}:){0,1}(?:(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\\\\\.){3,3}(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])|(?:[0-9a-fA-F]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\\\\\.){3,3}(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(?:/d{1,3})?$\\"}},\\"required\\":[]}},\\"required\\":[\\"value\\"]}}}}],\\"toolChoice\\":{\\"tool\\":{\\"name\\":\\"responseType\\"}}}; | ||
const toolConfig = {\\"tools\\":[{\\"toolSpec\\":{\\"name\\":\\"responseType\\",\\"description\\":\\"Generate a response type for the given field\\",\\"inputSchema\\":{\\"json\\":{\\"type\\":\\"object\\",\\"properties\\":{\\"value\\":{\\"type\\":\\"object\\",\\"properties\\":{\\"int\\":{\\"type\\":\\"number\\",\\"description\\":\\"A signed 32-bit integer value.\\"},\\"float\\":{\\"type\\":\\"number\\",\\"description\\":\\"An IEEE 754 floating point value.\\"},\\"string\\":{\\"type\\":\\"string\\",\\"description\\":\\"A UTF-8 character sequence.\\"},\\"id\\":{\\"type\\":\\"string\\",\\"description\\":\\"A unique identifier for an object. This scalar is serialized like a String but isn't meant to be human-readable.\\"},\\"boolean\\":{\\"type\\":\\"boolean\\",\\"description\\":\\"A boolean value.\\"},\\"awsjson\\":{\\"type\\":\\"string\\",\\"description\\":\\"A JSON string. Any valid JSON construct is automatically parsed and loaded in the resolver code as maps, lists, or scalar values rather than as the literal input strings. Unquoted strings or otherwise invalid JSON result in a GraphQL validation error.\\"},\\"awsemail\\":{\\"type\\":\\"string\\",\\"description\\":\\"An email address in the format local-part@domain-part as defined by RFC 822.\\",\\"pattern\\":\\"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\\\\\.[a-zA-Z]{2,}$\\"},\\"awsdate\\":{\\"type\\":\\"string\\",\\"description\\":\\"An extended ISO 8601 date string in the format YYYY-MM-DD.\\",\\"pattern\\":\\"^\\\\\\\\d{4}-d{2}-d{2}$\\"},\\"awstime\\":{\\"type\\":\\"string\\",\\"description\\":\\"An extended ISO 8601 time string in the format hh:mm:ss.sss.\\",\\"pattern\\":\\"^\\\\\\\\d{2}:\\\\\\\\d{2}:\\\\\\\\d{2}\\\\\\\\.\\\\\\\\d{3}$\\"},\\"awsdatetime\\":{\\"type\\":\\"string\\",\\"description\\":\\"An extended ISO 8601 date and time string in the format YYYY-MM-DDThh:mm:ss.sssZ.\\",\\"pattern\\":\\"^\\\\\\\\d{4}-\\\\\\\\d{2}-\\\\\\\\d{2}T\\\\\\\\d{2}:\\\\\\\\d{2}:\\\\\\\\d{2}\\\\\\\\.\\\\\\\\d{3}Z$\\"},\\"awstimestamp\\":{\\"type\\":\\"string\\",\\"description\\":\\"An integer value representing the number of seconds before or after 1970-01-01-T00:00Z.\\",\\"pattern\\":\\"^\\\\\\\\d+$\\"},\\"awsphone\\":{\\"type\\":\\"string\\",\\"description\\":\\"A phone number. This value is stored as a string. Phone numbers can contain either spaces or hyphens to separate digit groups. Phone numbers without a country code are assumed to be US/North American numbers adhering to the North American Numbering Plan (NANP).\\",\\"pattern\\":\\"^\\\\\\\\d{3}-d{3}-d{4}$\\"},\\"awsurl\\":{\\"type\\":\\"string\\",\\"description\\":\\"A URL as defined by RFC 1738. For example, https://www.amazon.com/dp/B000NZW3KC/ or mailto:[email protected]. URLs must contain a schema (http, mailto) and can't contain two forward slashes (//) in the path part.\\",\\"pattern\\":\\"^(https?|mailto)://[^s/$.?#].[^s]*$\\"},\\"awsipaddress\\":{\\"type\\":\\"string\\",\\"description\\":\\"A valid IPv4 or IPv6 address. IPv4 addresses are expected in quad-dotted notation (123.12.34.56). IPv6 addresses are expected in non-bracketed, colon-separated format (1a2b:3c4b::1234:4567). You can include an optional CIDR suffix (123.45.67.89/16) to indicate subnet mask.\\"}},\\"required\\":[]}},\\"required\\":[\\"value\\"]}}}}],\\"toolChoice\\":{\\"tool\\":{\\"name\\":\\"responseType\\"}}}; | ||
const prompt = \\"\\"; | ||
const args = JSON.stringify(ctx.args); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters