### Prompting: Avoiding Ambiguous Instructions Example Source: https://docs.giselles.ai/en/prompts/tips Shows an example of an ambiguous and incomplete prompt that leads to unclear outputs. The prompt 'Explain something useful' lacks specificity. ```plaintext ❌ Avoid: "Explain something useful." ``` -------------------------------- ### Prompting: Avoiding Restrictive Instructions Example Source: https://docs.giselles.ai/en/prompts/tips Highlights an example of overly restrictive instructions that should be avoided in prompt creation. This prompt is too rigid in its word count and specific number of examples required. ```plaintext ❌ Avoid: "Create a detailed report exactly 200 words, including exactly four examples." ``` -------------------------------- ### Prompting: Avoiding Contradictory Instructions Example Source: https://docs.giselles.ai/en/prompts/tips Provides an example of contradictory instructions that should be avoided. The prompt asks for an explanation that is simultaneously 'highly detailed' and 'simple,' and uses 'advanced terminology.' ```plaintext ❌ Avoid: "Provide a highly detailed yet simple explanation using advanced terminology." ``` -------------------------------- ### Prompting: Poor vs. Good Example Source: https://docs.giselles.ai/en/prompts/tips Illustrates the difference between an ambiguous, poor prompt and a clear, precise, and well-structured good prompt for an AI model. The good example defines the role, task, and output format explicitly. ```plaintext ❌ Poor example: "Describe a useful invention." ✅ Good example: "Role: Technology historian Task: Provide a concise summary (100 words max) of the invention of the telephone, highlighting its historical significance and modern impact. Output Format: - Summary paragraph - Clearly stated historical context and modern relevance" ``` -------------------------------- ### Example SQL Query for Counting Users Source: https://docs.giselles.ai/glossary/postgresql-tools This is an example of a standard SQL query that can be executed using the `query` tool to count the total number of records in a 'users' table. This demonstrates a basic data retrieval operation against a PostgreSQL database. ```sql SELECT COUNT(*) FROM users; ``` -------------------------------- ### Prompting: Effective Role Definition Example Source: https://docs.giselles.ai/en/prompts/tips Demonstrates an effective prompt for defining the AI's role and task. This example specifies the role of a 'UX Designer' and outlines the task of evaluating a web interface design, including the desired output format. ```plaintext ✅ Example: "Role: UX Designer Task: Evaluate the provided web interface design for usability issues. Output Format: - List identified issues clearly - Provide specific recommendations for improvements" ``` -------------------------------- ### Example Prompt for User Count Source: https://docs.giselles.ai/glossary/postgresql-tools This demonstrates a natural language prompt that an AI model can interpret to perform a database operation. When provided with configured PostgreSQL tools (`getTableStructure` and `query`), the AI will understand the request, generate the appropriate SQL, execute it, and return the result. ```text Please find out the total number of users from the database. ``` -------------------------------- ### Giselle Prompt Template Source: https://docs.giselles.ai/en/prompts/tips Presents a structured template for creating effective prompts in Giselle. This template includes fields for Role, Task, Constraints, Input Data, and Output Format, guiding users to provide all necessary information. ```plaintext ✅ Giselle Template: Role: [Defined AI role] Task: [Explicit, precise task description] Constraints: - [Specific constraint or limitation] - [Additional constraints as necessary] Input Data: - [Clearly referenced or provided data] Output Format: - [Detailed expected structure of response] ``` -------------------------------- ### Get GitHub Discussion Source: https://docs.giselles.ai/en/glossary/action-node Retrieve the content and details of a specific GitHub Discussion from a repository. ```APIDOC ## GET /websites/giselles_ai/actions/get-github-discussion ### Description This endpoint fetches the details of a specific GitHub Discussion from a given repository. ### Method GET ### Endpoint /websites/giselles_ai/actions/get-github-discussion ### Parameters #### Path Parameters None #### Query Parameters - **repository** (string) - Required - The GitHub repository (e.g., `giselles-ai/giselle`). - **discussionNumber** (integer) - Required - The number of the GitHub Discussion to retrieve. ### Request Example ``` GET /websites/giselles_ai/actions/get-github-discussion?repository=giselles-ai/giselle&discussionNumber=42 ``` ### Response #### Success Response (200) - **id** (string) - The ID of the discussion. - **title** (string) - The title of the discussion. - **bodyHTML** (string) - The content of the discussion in HTML format. - **createdAt** (string) - The creation timestamp of the discussion. - **updatedAt** (string) - The last updated timestamp of the discussion. - **author** (object) - Information about the discussion author. - **login** (string) - The author's GitHub login. - **avatarUrl** (string) - The URL of the author's avatar. - **comments** (array) - An array of comment objects. - **id** (string) - The ID of the comment. - **bodyHTML** (string) - The content of the comment in HTML format. - **createdAt** (string) - The creation timestamp of the comment. - **author** (object) - Information about the comment author. #### Response Example ```json { "id": "discussion_xyz789", "title": "Feature Request Ideas", "bodyHTML": "

I have some ideas for new features...

", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T11:00:00Z", "author": { "login": "user123", "avatarUrl": "https://example.com/avatar.png" }, "comments": [ { "id": "comment_abc456", "bodyHTML": "

Great ideas!

", "createdAt": "2023-10-27T10:30:00Z", "author": { "login": "user456", "avatarUrl": "https://example.com/avatar2.png" } } ] } ``` ``` -------------------------------- ### PostgreSQL Connection String Format Source: https://docs.giselles.ai/glossary/postgresql-tools This describes the standard format for PostgreSQL connection strings, which are used to authenticate and connect to a PostgreSQL database. It includes placeholders for user, password, host, port, and database name, and mentions optional parameters. Refer to official PostgreSQL documentation for a comprehensive list of parameters. ```text postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...] ``` -------------------------------- ### Repository Tools Source: https://docs.giselles.ai/glossary/github-tools Tools for interacting with GitHub repositories, including retrieving file contents and listing branches. ```APIDOC ## GET /repos/{owner}/{repo}/contents/{path} ### Description Retrieves file or directory contents from a repository. ### Method GET ### Endpoint `/repos/{owner}/{repo}/contents/{path}` ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name - **path** (string) - Required - Path to file/directory #### Query Parameters - **branch** (string) - Optional - Branch to get contents from ### Response #### Success Response (200) - **content** (string) - File content or directory listing - **encoding** (string) - Encoding of the content (e.g., "base64") #### Response Example ```json { "content": "SGVsbG8sIHdvcmxkIQ==", "encoding": "base64" } ``` ## GET /repos/{owner}/{repo}/branches ### Description Lists all branches in a repository with pagination support. ### Method GET ### Endpoint `/repos/{owner}/{repo}/branches` ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name #### Query Parameters - **page** (integer) - Optional - Page number for pagination, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Response #### Success Response (200) - **branches** (array) - List of branches - **name** (string) - Branch name - **commit** (object) - Commit information - **sha** (string) - SHA of the commit #### Response Example ```json { "branches": [ { "name": "main", "commit": { "sha": "a1b2c3d4e5f678901234567890abcdef12345678" } } ] } ``` ``` -------------------------------- ### File Operations API Source: https://docs.giselles.ai/en/glossary/github-tools APIs for creating and updating files in a GitHub repository. ```APIDOC ## POST /repos/{owner}/{repo}/contents/{path} ### Description Creates new files or updates existing ones with content, commit message, and branch. Requires SHA for updates. ### Method POST ### Endpoint /repos/{owner}/{repo}/contents/{path} ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name - **path** (string) - Required - Path where to create/update the file #### Query Parameters - **branch** (string) - Required - Branch to create/update the file in #### Request Body - **content** (string) - Required - Content of the file - **message** (string) - Required - Commit message - **sha** (string) - Optional - SHA of file being replaced, required for updates ### Request Example ```json { "content": "file content", "message": "Commit message", "sha": "optional_sha" } ``` ### Response #### Success Response (200) - **content** (object) - Details of the created/updated file - **commit** (object) - Information about the commit #### Response Example ```json { "content": { "name": "example.txt", "path": "path/to/example.txt", "sha": "new_sha", "size": 123, "url": "..." }, "commit": { "sha": "commit_sha", "message": "Commit message", "url": "..." } } ``` ``` -------------------------------- ### Search API Source: https://docs.giselles.ai/en/glossary/github-tools APIs for searching code, issues, pull requests, repositories, and users on GitHub. ```APIDOC ## GET /search/code ### Description Searches for code using GitHub's code search syntax. ### Method GET ### Endpoint /search/code ### Parameters #### Query Parameters - **q** (string) - Required - Search query using GitHub code search syntax - **sort** (string) - Optional - Sort by `indexed` - **order** (string) - Optional - Sort order: `asc` or `desc` - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Response #### Success Response (200) - **total_count** (integer) - Total number of results - **items** (array) - Array of code search results #### Response Example ```json { "total_count": 1000, "items": [ { "name": "example.js", "path": "src/example.js", "repository": {"full_name": "owner/repo"} } ] } ``` ``` ```APIDOC ## GET /search/issues ### Description Searches issues and pull requests using GitHub search syntax, can be scoped to specific owner/repo. ### Method GET ### Endpoint /search/issues ### Parameters #### Query Parameters - **q** (string) - Required - Search query using GitHub issues search syntax - **sort** (string) - Optional - Sort by: `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, `interactions`, `created`, `updated` - **order** (string) - Optional - Sort order: `asc` or `desc` - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Response #### Success Response (200) - **total_count** (integer) - Total number of results - **items** (array) - Array of issue/pull request search results #### Response Example ```json { "total_count": 500, "items": [ { "title": "Bug in login", "number": 123, "repository": {"full_name": "owner/repo"}, "html_url": "..." } ] } ``` ``` ```APIDOC ## GET /search/pulls ### Description Specifically searches pull requests with advanced filtering and GitHub search syntax. ### Method GET ### Endpoint /search/pulls ### Parameters #### Query Parameters - **q** (string) - Required - Search query using GitHub issues search syntax, automatically adds `type:pr` - **sort** (string) - Optional - Sort by: `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, `interactions`, `created`, `updated` - **order** (string) - Optional - Sort order: `asc` or `desc` - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Response #### Success Response (200) - **total_count** (integer) - Total number of results - **items** (array) - Array of pull request search results #### Response Example ```json { "total_count": 200, "items": [ { "title": "Feature: Add new API", "number": 456, "repository": {"full_name": "owner/repo"}, "html_url": "..." } ] } ``` ``` ```APIDOC ## GET /search/repositories ### Description Finds repositories matching search query with pagination support. ### Method GET ### Endpoint /search/repositories ### Parameters #### Query Parameters - **query** (string) - Required - Search query - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Response #### Success Response (200) - **total_count** (integer) - Total number of repositories found - **items** (array) - Array of repository search results #### Response Example ```json { "total_count": 5000, "items": [ { "full_name": "owner/repo_name", "description": "A sample repository", "html_url": "..." } ] } ``` ``` ```APIDOC ## GET /search/users ### Description Searches for GitHub users using search syntax. ### Method GET ### Endpoint /search/users ### Parameters #### Query Parameters - **q** (string) - Required - Search query using GitHub users search syntax - **sort** (string) - Optional - Sort by: `followers`, `repositories`, `joined` - **order** (string) - Optional - Sort order: `asc` or `desc` - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Response #### Success Response (200) - **total_count** (integer) - Total number of users found - **items** (array) - Array of user search results #### Response Example ```json { "total_count": 10000, "items": [ { "login": "octocat", "html_url": "..." } ] } ``` ``` -------------------------------- ### Code Management API Source: https://docs.giselles.ai/glossary/github-tools Endpoints for managing code, such as creating branches. ```APIDOC ## POST /repos/{owner}/{repo}/branches ### Description Creates a new branch from an existing branch or the repository's default branch. ### Method POST ### Endpoint /repos/{owner}/{repo}/branches ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name #### Request Body - **branch** (string) - Required - The name for the new branch. - **fromBranch** (string) - Optional - The name of the branch to create the new branch from. Defaults to the repository's default branch. ### Request Example ```json { "owner": "octocat", "repo": "Spoon-Knife", "branch": "new-feature-branch", "fromBranch": "main" } ``` ### Response #### Success Response (201) - **name** (string) - The name of the created branch. #### Response Example ```json { "name": "new-feature-branch" } ``` ``` -------------------------------- ### Issues Tools Source: https://docs.giselles.ai/glossary/github-tools Tools for managing GitHub issues, including creating, retrieving, listing, updating, and commenting. ```APIDOC ## POST /repos/{owner}/{repo}/issues ### Description Opens a new issue with required title and optional body, assignees, labels, and milestone number. ### Method POST ### Endpoint `/repos/{owner}/{repo}/issues` ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name #### Request Body - **title** (string) - Required - Issue title - **body** (string) - Optional - Issue body content - **assignees** (array of strings) - Optional - Usernames to assign - **labels** (array of strings) - Optional - Labels to apply - **milestone** (integer) - Optional - Milestone number ### Request Example ```json { "title": "Bug in login functionality", "body": "Users are unable to log in via the main portal.", "assignees": ["octocat"], "labels": ["bug", "urgent"] } ``` ### Response #### Success Response (201) - **number** (integer) - The issue number - **title** (string) - The issue title - **body** (string) - The issue body - **user** (object) - The user who created the issue #### Response Example ```json { "number": 1, "title": "Bug in login functionality", "body": "Users are unable to log in via the main portal.", "user": { "login": "octocat" } } ``` ## GET /repos/{owner}/{repo}/issues/{issueNumber} ### Description Retrieves detailed information about a specific issue by its number. ### Method GET ### Endpoint `/repos/{owner}/{repo}/issues/{issueNumber}` ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name - **issueNumber** (integer) - Required - Issue number ### Response #### Success Response (200) - **number** (integer) - The issue number - **title** (string) - The issue title - **body** (string) - The issue body - **state** (string) - The state of the issue (open/closed) #### Response Example ```json { "number": 1, "title": "Bug in login functionality", "body": "Users are unable to log in via the main portal.", "state": "open" } ``` ## GET /repos/{owner}/{repo}/issues ### Description Lists repository issues with filters for state, labels, date, sort order, and direction with pagination. ### Method GET ### Endpoint `/repos/{owner}/{repo}/issues` ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name #### Query Parameters - **state** (string) - Optional - open/closed/all - **labels** (array of strings) - Optional - Labels to filter by - **sort** (string) - Optional - created/updated/comments - **direction** (string) - Optional - asc/desc - **since** (string) - Optional - ISO 8601 timestamp - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Response #### Success Response (200) - **issues** (array) - List of issues - **number** (integer) - Issue number - **title** (string) - Issue title - **state** (string) - Issue state #### Response Example ```json { "issues": [ { "number": 1, "title": "Bug in login functionality", "state": "open" } ] } ``` ## PATCH /repos/{owner}/{repo}/issues/{issueNumber} ### Description Updates an existing issue’s properties. ### Method PATCH ### Endpoint `/repos/{owner}/{repo}/issues/{issueNumber}` ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name - **issueNumber** (integer) - Required - Issue number to update #### Request Body - **title** (string) - Optional - New title - **body** (string) - Optional - New description - **state** (string) - Optional - open/closed - **assignees** (array of strings) - Optional - New assignees array - **labels** (array of strings) - Optional - New labels array - **milestone** (integer) - Optional - New milestone number ### Request Example ```json { "state": "closed", "title": "Resolved: Bug in login functionality" } ``` ### Response #### Success Response (200) - **number** (integer) - The issue number - **title** (string) - The updated issue title - **state** (string) - The updated issue state #### Response Example ```json { "number": 1, "title": "Resolved: Bug in login functionality", "state": "closed" } ``` ## POST /repos/{owner}/{repo}/issues/{issueNumber}/comments ### Description Adds a comment to an existing issue with required body content. ### Method POST ### Endpoint `/repos/{owner}/{repo}/issues/{issueNumber}/comments` ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name - **issueNumber** (integer) - Required - Issue number #### Request Body - **body** (string) - Required - Comment content ### Request Example ```json { "body": "This issue has been resolved." } ``` ### Response #### Success Response (201) - **id** (integer) - The comment ID - **body** (string) - The comment content - **user** (object) - The user who posted the comment #### Response Example ```json { "id": 12345, "body": "This issue has been resolved.", "user": { "login": "octocat" } } ``` ``` -------------------------------- ### Search API Source: https://docs.giselles.ai/glossary/github-tools Endpoints for searching code, issues, pull requests, repositories, and users. ```APIDOC ## GET /search/code ### Description Searches for code using GitHub’s code search syntax. ### Method GET ### Endpoint /search/code ### Parameters #### Query Parameters - **q** (string) - Required - Search query using GitHub code search syntax - **sort** (string) - Optional - indexed - **order** (string) - Optional - asc/desc - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Request Example ``` GET /search/code?q=addClass+in:file+language:js ``` ### Response #### Success Response (200) - **total_count** (integer) - Total number of results. - **items** (array) - List of code search results. #### Response Example ```json { "total_count": 1000, "items": [ { "name": "script.js", "path": "src/script.js", "sha": "commit_sha", "html_url": "html_url", "score": 1.0 } ] } ``` ``` ```APIDOC ## GET /search/issues ### Description Searches issues and pull requests using GitHub search syntax, can be scoped to specific owner/repo. ### Method GET ### Endpoint /search/issues ### Parameters #### Query Parameters - **q** (string) - Required - Search query using GitHub issues search syntax - **sort** (string) - Optional - comments/reactions/reactions-+1/reactions—1/reactions-smile/reactions-thinking_face/reactions-heart/reactions-tada/interactions/created/updated - **order** (string) - Optional - asc/desc - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Request Example ``` GET /search/issues?q=is:open+label:bug ``` ### Response #### Success Response (200) - **total_count** (integer) - Total number of results. - **items** (array) - List of issue search results. #### Response Example ```json { "total_count": 50, "items": [ { "url": "issue_url", "title": "Bug in login", "state": "open", "html_url": "html_url", "number": 1, "user": { "login": "octocat", "avatar_url": "avatar_url" } } ] } ``` ``` ```APIDOC ## GET /search/pulls ### Description Specifically searches pull requests with advanced filtering and GitHub search syntax. ### Method GET ### Endpoint /search/pulls ### Parameters #### Query Parameters - **q** (string) - Required - Search query using GitHub issues search syntax, automatically adds type:pr - **sort** (string) - Optional - comments/reactions/reactions-+1/reactions—1/reactions-smile/reactions-thinking_face/reactions-heart/reactions-tada/interactions/created/updated - **order** (string) - Optional - asc/desc - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Request Example ``` GET /search/pulls?q=is:open+label:enhancement ``` ### Response #### Success Response (200) - **total_count** (integer) - Total number of results. - **items** (array) - List of pull request search results. #### Response Example ```json { "total_count": 20, "items": [ { "url": "pull_request_url", "title": "Add new feature", "state": "open", "html_url": "html_url", "number": 10, "user": { "login": "octocat", "avatar_url": "avatar_url" } } ] } ``` ``` ```APIDOC ## GET /search/repositories ### Description Finds repositories matching search query with pagination support. ### Method GET ### Endpoint /search/repositories ### Parameters #### Query Parameters - **query** (string) - Required - Search query - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Request Example ``` GET /search/repositories?query=tetris+language:assembly&sort=stars&order=desc ``` ### Response #### Success Response (200) - **total_count** (integer) - Total number of results. - **items** (array) - List of repository search results. #### Response Example ```json { "total_count": 1000, "items": [ { "name": "my-repo", "full_name": "owner/my-repo", "html_url": "html_url", "description": "A sample repository.", "stargazers_count": 100 } ] } ``` ``` ```APIDOC ## GET /search/users ### Description Searches for GitHub users using search syntax. ### Method GET ### Endpoint /search/users ### Parameters #### Query Parameters - **q** (string) - Required - Search query using GitHub users search syntax - **sort** (string) - Optional - followers/repositories/joined - **order** (string) - Optional - asc/desc - **page** (integer) - Optional - Page number, min 1 - **perPage** (integer) - Optional - Results per page, min 1, max 100 ### Request Example ``` GET /search/users?q=tom+repos:%3E10 ``` ### Response #### Success Response (200) - **total_count** (integer) - Total number of results. - **items** (array) - List of user search results. #### Response Example ```json { "total_count": 500, "items": [ { "login": "octocat", "id": 1, "avatar_url": "avatar_url", "html_url": "html_url" } ] } ``` ``` -------------------------------- ### File Management API Source: https://docs.giselles.ai/glossary/github-tools Endpoints for creating or updating files in a GitHub repository. ```APIDOC ## POST /repos/{owner}/{repo}/contents/{path} ### Description Creates new files or updates existing ones with content, commit message, and branch. Requires SHA for updates. ### Method POST ### Endpoint /repos/{owner}/{repo}/contents/{path} ### Parameters #### Path Parameters - **owner** (string) - Required - Repository owner - **repo** (string) - Required - Repository name - **path** (string) - Required - Path where to create/update the file #### Query Parameters - **message** (string) - Required - Commit message - **branch** (string) - Required - Branch to create/update the file in - **sha** (string) - Optional - SHA of file being replaced, required for updates #### Request Body - **content** (string) - Required - Content of the file ### Request Example ```json { "message": "Initial commit", "branch": "main", "content": "IyEvYmluL2Jhc2g\n\neWNobyAnaGVsbG8gJ1\n" } ``` ### Response #### Success Response (200) - **content** (object) - Information about the created/updated file. - **commit** (object) - Information about the commit. #### Response Example ```json { "content": { "name": "example.txt", "path": "example.txt", "sha": "abcdef1234567890", "size": 100, "url": "https://api.github.com/repos/owner/repo/contents/example.txt", "html_url": "https://github.com/owner/repo/blob/main/example.txt", "git_url": "https://api.github.com/repos/owner/repo/git/blobs/abcdef1234567890", "download_url": "https://raw.githubusercontent.com/owner/repo/main/example.txt" }, "commit": { "sha": "abcdef1234567890", "message": "Initial commit", "url": "https://api.github.com/repos/owner/repo/git/commits/abcdef1234567890" } } ``` ```