Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Example ¶
type Example struct { Input `json:"Input"` Suggestion `json:"Suggestion"` }
type Examples ¶
type Examples []*Example
Examples represents a list of input/output pairs to be used as examples to follow by the Suggest function. Can be used to create few-shot prompts or fine-tune a model.
func (Examples) WriteFiles ¶
WriteFiles writes the examples to the given folder in the following formats:
- <folder>/data/examples.json: a JSON array of the examples (used directly by the Suggest function)
- <folder>/data/examples.csv: a CSV-formatted list of each example, where the input and output are comma-separated JSON objects. Can be used as an input to a Makersuite data prompt.
- <folder>/data/prompt.txt: the prompt that will be used by Suggest (with placeholder data for the final input)
type GeminiClient ¶
type GeminiClient struct {
// contains filtered or unexported fields
}
func NewGeminiClient ¶
func NewGeminiClient(ctx context.Context) (*GeminiClient, error)
func (*GeminiClient) GenerateText ¶
type Suggestion ¶
Directories ¶
Path | Synopsis |
---|---|
Command gen_examples generates and stores examples that can be used to create prompts / training inputs for Google's Generative AI APIs.
|
Command gen_examples generates and stores examples that can be used to create prompts / training inputs for Google's Generative AI APIs. |
Click to show internal directories.
Click to hide internal directories.