-
Notifications
You must be signed in to change notification settings - Fork 0
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 #85 from conneroisu/fix/finish-composio
fix/finish composio
- Loading branch information
Showing
148 changed files
with
4,983 additions
and
5,997 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 |
---|---|---|
@@ -1 +1 @@ | ||
1.23.1 | ||
1.23.2 |
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,63 @@ | ||
package groq | ||
|
||
import ( | ||
"context" | ||
"log/slog" | ||
|
||
"github.com/conneroisu/groq-go/pkg/tools" | ||
) | ||
|
||
type ( | ||
// Agenter is an interface for an agent. | ||
Agenter interface { | ||
ToolManager | ||
} | ||
// ToolManager is an interface for a tool manager. | ||
ToolManager interface { | ||
ToolGetter | ||
ToolRunner | ||
} | ||
// ToolGetter is an interface for a tool getter. | ||
ToolGetter interface { | ||
Get( | ||
ctx context.Context, | ||
params ToolGetParams, | ||
) ([]tools.Tool, error) | ||
} | ||
// ToolRunner is an interface for a tool runner. | ||
ToolRunner interface { | ||
Run( | ||
ctx context.Context, | ||
response ChatCompletionResponse, | ||
) ([]ChatCompletionMessage, error) | ||
} | ||
// ToolGetParams are the parameters for getting tools. | ||
ToolGetParams struct { | ||
} | ||
// Router is an agent router. | ||
// | ||
// It is used to route messages to the appropriate model. | ||
Router struct { | ||
// Agents is the agents of the router. | ||
Agents []Agent | ||
// Logger is the logger of the router. | ||
Logger *slog.Logger | ||
} | ||
) | ||
|
||
// Agent is an agent. | ||
type Agent struct { | ||
client *Client | ||
logger *slog.Logger | ||
} | ||
|
||
// NewAgent creates a new agent. | ||
func NewAgent( | ||
client *Client, | ||
logger *slog.Logger, | ||
) *Agent { | ||
return &Agent{ | ||
client: client, | ||
logger: logger, | ||
} | ||
} |
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
Oops, something went wrong.