-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from use-the-fork/development
Development
- Loading branch information
Showing
49 changed files
with
1,278 additions
and
281 deletions.
There are no files selected for viewing
Empty file.
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# SQL Tool Agent | ||
|
||
The `SQLToolAgent` has access to the `ListSQLDatabaseTool`, `InfoSQLDatabaseTool`, and `QuerySQLDataBaseTool` tools. Given user input, it will use these tools to attempt to answer the provided question based on the database. | ||
|
||
## Usage | ||
|
||
To use this agent, include it in your code as shown below. The `handle` method requires one input: | ||
- **`input`**: The question you would like answered based on the database. | ||
|
||
```php | ||
<?php | ||
|
||
use UseTheFork\Synapse\Agents\SQLToolAgent; | ||
|
||
$agent = new SQLToolAgent; | ||
$agentResponse = $agent->handle(['input' => 'How many organizations are operating and what is the average number of funding rounds for them?']); | ||
``` | ||
|
||
### Example Output | ||
|
||
The above code will produce the following output: | ||
|
||
```php | ||
array:3 [ | ||
"role" => "assistant" | ||
"finish_reason" => "stop" | ||
"content" => array:1 [ | ||
"answer" => "There are 100 organizations currently operating, and the average number of funding rounds for them is 5." | ||
] | ||
] | ||
``` |
Oops, something went wrong.