Skip to content

Commit

Permalink
Merge pull request tmc#176 from abdallamourad/fix-typos
Browse files Browse the repository at this point in the history
[outputparser] fix typos in the outputparser structured file
  • Loading branch information
tmc authored Jul 7, 2023
2 parents 3a358d5 + 1caf536 commit 41826d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ coverage.out
.vscode

# dev
.env
.env
vendor/*
6 changes: 3 additions & 3 deletions outputparser/structured.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
)

// ResponseSchema is struct used in the structured output parser to describe
// how the llm should format it's response. Name is a key in the parsed
// how the llm should format its response. Name is a key in the parsed
// output map. Description is a description of what the value should contain.
type ResponseSchema struct {
Name string
Expand All @@ -53,7 +53,7 @@ func NewStructured(schema []ResponseSchema) Structured {
}
}

// Statically assert that CommaSeparatedList implement the OutputParser interface.
// Statically assert that Structured implement the OutputParser interface.
var _ schema.OutputParser[map[string]string] = Structured{}

// Parse parses the output of an llm into a map. If the output of the llm doesn't
Expand Down Expand Up @@ -105,7 +105,7 @@ func (p Structured) ParseWithPrompt(text string, _ schema.PromptValue) (map[stri
}

// GetFormatInstructions returns a string explaining how the llm should format
// it's response.
// its response.
func (p Structured) GetFormatInstructions() string {
jsonLines := ""
for _, rs := range p.ResponseSchemas {
Expand Down

0 comments on commit 41826d0

Please sign in to comment.