37 Commits

Author SHA1 Message Date
Travis Cline 77504b877f all: expand test coverage (#1312)
* scripts: cleanup test scripts
* lint: add test pattern and architectural linting
* internal/httprr: expand httprr testing
* test: add comprehensive unit test coverage
* docs: add comprehensive testing guide to CONTRIBUTING.md
* examples: standardize module versions and cleanup dependencies
* all: re-record several httprr recordings
2025-06-16 18:14:02 +02:00
Manuel de la Peña 8d4c17fc73 ci: migrate linting golangci-lint to v2.0.2 (#1217)
* chore: use slices and maps packages

* chore: skip embedded type

* chore: use fmt.Fprint instead

* chore: use switch

* chore: reorder imports

* chore: add white lines

* chore: use t.Setenv

* chore: excplicitly omit non used param

* chore: use t.TempDir

* chore: use maps package

* chore: migrate golangci-lint config file

Run: "golangci-lint migrate -c .golangci.yaml --skip-validation"

* chore: bump golangci-lint action to v7
2025-04-12 01:54:50 -07:00
Anuraag (Rag) Agrawal c362f8a2e9 outputparser: use strings.Cut in structured parser (#997)
outputparser: replace strings.Split with strings.Cut in structured parser
2024-09-12 17:25:24 -07:00
Amitai Frey f4c2abbcd9 outputparser: improve DefinedOutputParser (#980)
The DefinedOutputParser prompted the LLM with a Typescript schema,
but expected a json in response: https://github.com/tmc/langchaingo/blob/1975058648b5914fdd9dc53434c5b59f219e2b5c/outputparser/defined.go\#L65-69
Now it also requests a json.
2024-09-12 17:16:37 -07:00
Amitai Frey ddb8293d20 outputparser: improve BooleanOutputParser (#978)
The BooleanOutputParser requests the LLM to respond with a boolean,
and gives examples such as `true` or `false`. However, it only parsed
respones that include YES or NO. This commits adds more values for
parsing and changes the tests to fit them.
2024-09-12 17:16:11 -07:00
Eric Tse d9f204a564 outputparser: add Defined parser to extract a struct from LLM output (#856)
* outputparser: add 'Defined' parser to extract a struct from LLM output through tagging

Introduces an output parser named 'Defined' as an improvement to the existing
output parser 'Structured'. It is most similar to LangChain's PydanticOutputParser
described at https://api.python.langchain.com/en/latest/output_parsers/langchain_core.output_parsers.pydantic.PydanticOutputParser.html

For best results, use this with the tool calling feature of your LLM.
2024-06-20 10:41:47 -04:00
Eli Bendersky 556a263188 schema: move Chat* types to llms (#757)
* schema: move Chat* types to llms

This prevents a circular dependency or code duplication when using Tools
2024-04-16 23:35:51 -07:00
Travis Cline b6ba6693d3 tooling: Update minimum go version to 1.22, update golangci-lint (#722)
* go: Update to go 1.22, update golangci-lint config

* lint: Address various lint issues

* chains: fix lint complaint in TestApplyWithCanceledContext

* lint: Address addtional lint issues

* lint: Address addtional lint issues

* tools: update golangci-lint to 1.57
2024-03-26 20:31:20 +00:00
chyroc 55f772c21a Docs: fix comment typo (#442)
* Docs: fix comment typo

* docs: a llm -> an LLM

---------

Co-authored-by: Travis Cline <travis.cline@gmail.com>
2023-12-20 19:57:37 +00:00
Ismail 80f9027554 fix: golangci-lint v1.55 errors 2023-12-04 22:38:28 -08:00
zivkovicn c9480116aa feature-adding-max-token-size-memory | logic update 2023-07-24 18:49:38 +02:00
Travis Cline 564eb8b652 Merge pull request #195 from baoist/outputparser/feat/boolean-parser
outputparser: Add BooleanParser
2023-07-23 11:32:35 -07:00
Travis Cline c907368707 Merge pull request #194 from baoist/outputparser/feat/regex-dict
feat(outputparser): Add Regex Dict Parser
2023-07-23 11:31:49 -07:00
Brad Olson fd2408f543 Merge branch 'main' into outputparser/feat/boolean-parser 2023-07-20 02:50:46 -04:00
Brad Olson 1f581d07db fix: add typechecking, linting 2023-07-17 22:35:46 -04:00
Brad Olson e75fabd7bc fix: return map string any from parse output 2023-07-17 22:30:53 -04:00
Brad Olson 6e884cfb1c wip: hold generics
wip: hold generics

feat(outputparser): add combining parser
2023-07-17 22:30:51 -04:00
Brad Olson fb158284ec doc: add struct key documentation 2023-07-14 22:48:48 -04:00
Brad Olson ec6b06e0ec test: add additional condition 2023-07-14 22:03:29 -04:00
Brad Olson 678a2a3463 feat: add boolean outputparser 2023-07-14 21:58:50 -04:00
Brad Olson c5ae18ac58 doc: fix code docs 2023-07-14 14:56:49 -04:00
Brad Olson c7a6a76a71 doc: fix typo 2023-07-14 14:55:38 -04:00
Brad Olson aa3defa51f fix: improve readability, lint 2023-07-14 14:53:20 -04:00
Brad Olson f68b0d9d59 fix: add test condition for no update value 2023-07-14 14:51:02 -04:00
Brad Olson c96fefb94a doc: add/update docs 2023-07-14 14:50:42 -04:00
Brad Olson cae54c09af feat: add regex dict output parser 2023-07-14 14:41:46 -04:00
Brad Olson 9d3dcac08f docs: adds regex parser to outputparser docs 2023-07-09 22:35:43 -04:00
Brad Olson 0b0e186a2e fix: improve the format of regex parser for llm chain use 2023-07-09 22:09:06 -04:00
Brad Olson 270180c294 doc: append period for comment fmt 2023-07-08 13:19:17 -04:00
Brad Olson ab5b9252f2 feat: add regex output parser 2023-07-08 13:11:37 -04:00
AbdallaMourad 654a1cc81b fix typos in the structured file 2023-07-07 21:07:25 +08:00
Taiwo Hassan Yusuf 02745a9320 Fixed lint issues 2023-06-19 09:57:09 +01:00
Taiwo Hassan Yusuf 4d7a8e246e Added package level comments to codebase 2023-06-19 09:35:48 +01:00
FluffyKebab 1dbcb0cdc4 outputparser: add nolint in test 2023-04-26 20:48:33 +02:00
FluffyKebab aa52ac8c8d outputparser: rename empty 2023-04-26 20:45:05 +02:00
FluffyKebab 01bae9e3b2 Add t.Parallel 2023-04-25 11:16:00 +02:00
FluffyKebab 2403a4874d Remove mixed capes in package name 2023-04-25 11:15:55 +02:00