-
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.
added gomarkdoc to devenv and added a README.md to the tools package
that is generated from the gomarkdoc comments in doc.go
- Loading branch information
1 parent
0c838da
commit 2b54d99
Showing
3 changed files
with
167 additions
and
0 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 |
---|---|---|
|
@@ -38,6 +38,7 @@ in { | |
gomodifytags | ||
gotests | ||
gotools | ||
gomarkdoc | ||
]; | ||
|
||
scripts = { | ||
|
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,164 @@ | ||
# tools | ||
|
||
LLM Tooling package for groq-go. | ||
|
||
<!-- gomarkdoc:embed:start --> | ||
|
||
<!-- Code generated by gomarkdoc. DO NOT EDIT --> | ||
|
||
# tools | ||
|
||
```go | ||
import "github.com/conneroisu/groq-go/pkg/tools" | ||
``` | ||
|
||
Package tools contains the interfaces for groq\-go tooling usable by llms. | ||
|
||
## Index | ||
|
||
- [type FunctionCall](<#FunctionCall>) | ||
- [type FunctionDefinition](<#FunctionDefinition>) | ||
- [type FunctionParameters](<#FunctionParameters>) | ||
- [type PropertyDefinition](<#PropertyDefinition>) | ||
- [type Tool](<#Tool>) | ||
- [type ToolCall](<#ToolCall>) | ||
- [type ToolChoice](<#ToolChoice>) | ||
- [type ToolFunction](<#ToolFunction>) | ||
- [type ToolType](<#ToolType>) | ||
|
||
|
||
<a name="FunctionCall"></a> | ||
## type [FunctionCall](<https://github.com/conneroisu/groq-go/blob/main/pkg/tools/tools.go#L62-L67>) | ||
|
||
FunctionCall represents a function call. | ||
|
||
```go | ||
type FunctionCall struct { | ||
// Name is the name of the function call. | ||
Name string `json:"name,omitempty"` | ||
// Arguments is the arguments of the function call in JSON format. | ||
Arguments string `json:"arguments,omitempty"` | ||
} | ||
``` | ||
|
||
<a name="FunctionDefinition"></a> | ||
## type [FunctionDefinition](<https://github.com/conneroisu/groq-go/blob/main/pkg/tools/tools.go#L33-L37>) | ||
|
||
FunctionDefinition represents the function definition. | ||
|
||
```go | ||
type FunctionDefinition struct { | ||
Name string `json:"name"` | ||
Description string `json:"description"` | ||
Parameters FunctionParameters `json:"parameters"` | ||
} | ||
``` | ||
|
||
<a name="FunctionParameters"></a> | ||
## type [FunctionParameters](<https://github.com/conneroisu/groq-go/blob/main/pkg/tools/tools.go#L39-L44>) | ||
|
||
FunctionParameters represents the function parameters of a tool. | ||
|
||
```go | ||
type FunctionParameters struct { | ||
Type string `json:"type"` | ||
Properties map[string]PropertyDefinition `json:"properties"` | ||
Required []string `json:"required"` | ||
AdditionalProperties bool `json:"additionalProperties,omitempty"` | ||
} | ||
``` | ||
|
||
<a name="PropertyDefinition"></a> | ||
## type [PropertyDefinition](<https://github.com/conneroisu/groq-go/blob/main/pkg/tools/tools.go#L46-L49>) | ||
|
||
PropertyDefinition represents the property definition. | ||
|
||
```go | ||
type PropertyDefinition struct { | ||
Type string `json:"type"` | ||
Description string `json:"description"` | ||
} | ||
``` | ||
|
||
<a name="Tool"></a> | ||
## type [Tool](<https://github.com/conneroisu/groq-go/blob/main/pkg/tools/tools.go#L10-L15>) | ||
|
||
Tool represents the tool. | ||
|
||
```go | ||
type Tool struct { | ||
// Type is the type of the tool. | ||
Type ToolType `json:"type"` | ||
// Function is the tool's functional definition. | ||
Function FunctionDefinition `json:"function,omitempty"` | ||
} | ||
``` | ||
|
||
<a name="ToolCall"></a> | ||
## type [ToolCall](<https://github.com/conneroisu/groq-go/blob/main/pkg/tools/tools.go#L51-L60>) | ||
|
||
ToolCall represents a tool call. | ||
|
||
```go | ||
type ToolCall struct { | ||
// Index is not nil only in chat completion chunk object | ||
Index *int `json:"index,omitempty"` | ||
// ID is the id of the tool call. | ||
ID string `json:"id"` | ||
// Type is the type of the tool call. | ||
Type string `json:"type"` | ||
// Function is the function of the tool call. | ||
Function FunctionCall `json:"function"` | ||
} | ||
``` | ||
|
||
<a name="ToolChoice"></a> | ||
## type [ToolChoice](<https://github.com/conneroisu/groq-go/blob/main/pkg/tools/tools.go#L21-L26>) | ||
|
||
ToolChoice represents the tool choice. | ||
|
||
```go | ||
type ToolChoice struct { | ||
// Type is the type of the tool choice. | ||
Type ToolType `json:"type"` | ||
// Function is the function of the tool choice. | ||
Function ToolFunction `json:"function,omitempty"` | ||
} | ||
``` | ||
|
||
<a name="ToolFunction"></a> | ||
## type [ToolFunction](<https://github.com/conneroisu/groq-go/blob/main/pkg/tools/tools.go#L28-L31>) | ||
|
||
ToolFunction represents the tool function. | ||
|
||
```go | ||
type ToolFunction struct { | ||
// Name is the name of the tool function. | ||
Name string `json:"name"` | ||
} | ||
``` | ||
|
||
<a name="ToolType"></a> | ||
## type [ToolType](<https://github.com/conneroisu/groq-go/blob/main/pkg/tools/tools.go#L19>) | ||
|
||
ToolType is the tool type. | ||
|
||
string | ||
|
||
```go | ||
type ToolType string | ||
``` | ||
|
||
<a name="ToolTypeFunction"></a> | ||
|
||
```go | ||
const ( | ||
// ToolTypeFunction is the function tool type. | ||
ToolTypeFunction ToolType = "function" | ||
) | ||
``` | ||
|
||
Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>) | ||
|
||
|
||
<!-- gomarkdoc:embed:end --> |
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,2 +1,4 @@ | ||
// Package tools contains the interfaces for groq-go tooling usable by llms. | ||
package tools | ||
|
||
//go:generate gomarkdoc -o README.md -e . |