kor

LLM(😽)

MIT License

Downloads
47.2K
Stars
1.6K
Committers
10

Bot releases are hidden (Show)

kor - Version 2.0.0

Published by eyurtsev 3 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/eyurtsev/kor/compare/1.0.0...2.0.0

kor - Version 1.0.0 Latest Release

Published by eyurtsev about 1 year ago

Changes

  • kor is now compatible with both pydantic v2 and v1
  • pydantic v2 had significant breaking changes w/ respect to v1, so a major version bump was used in kor as a precaution to warn users about potential breaking changes.

Main things to watch out for when bumping to new pydantic version and new kor:

  1. Use a default value for any Optional fields if using pydantic v2 for validation.
class MusicRequest(BaseModel):
    song: Optional[List[str]] = Field(
        default=None,
        description="The song(s) that the user would like to be played."
    )
  1. Kor schema is typed checked using pydantic. Pydantic v2 is stricter, and may
    catch issues that were hiding in existing user code that was using the kor
    library.

  2. Serialization has not yet been implemented with pydantic v2.

Other changes

node ids are not longer required to be valid identifiers. This helps when using node ids which are attribute names written in other languages (e.g., chinese).

What's Changed

Full Changelog: https://github.com/eyurtsev/kor/compare/0.13.0...1.0.0

kor - Version 0.13.0

Published by eyurtsev over 1 year ago

What's Changed

Attaches parser directly to extraction chain, allowing usage of the run method and deprecating usage of predict_and_parse (and async variants respectively).

Full Changelog: https://github.com/eyurtsev/kor/compare/0.12.0...0.13.0

kor - Version 0.12.0

Published by eyurtsev over 1 year ago

What's Changed

Full Changelog: https://github.com/eyurtsev/kor/compare/0.11.0...0.12.0

kor - Version 0.11.0

Published by eyurtsev over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/eyurtsev/kor/compare/0.10.0...0.11.0

kor - Version 0.10.0

Published by eyurtsev over 1 year ago

What's Changed

Full Changelog: https://github.com/eyurtsev/kor/compare/0.9.2...0.10.0

kor - Version 0.9.2

Published by eyurtsev over 1 year ago

What's Changed

Fix for JSON encoding when extracting non English text (https://github.com/eyurtsev/kor/issues/152)

Full Changelog: https://github.com/eyurtsev/kor/compare/0.9.1...0.9.2

kor - Version 0.9.1

Published by eyurtsev over 1 year ago

What's Changed

Full Changelog: https://github.com/eyurtsev/kor/compare/0.9.0...0.9.1

kor - Version 0.9.0

Published by eyurtsev over 1 year ago

What's Changed

Propagating verbosity flag to allow users to set verbosity on the extraction chain: @eyurtsev in https://github.com/eyurtsev/kor/pull/137

Full Changelog: https://github.com/eyurtsev/kor/compare/0.8.1...0.9.0

kor - Version 0.8.1

Published by eyurtsev over 1 year ago

What's Changed

Fix for this issue: https://github.com/eyurtsev/kor/issues/130 -- If the examples that were defined on an object were a list of dicts with each dict containing exactly 2 items, then the list of dicts was incorrectly coerced by pydantic into a dict

Full Changelog: https://github.com/eyurtsev/kor/compare/0.8.0...0.8.1

kor - Version 0.8.0

Published by eyurtsev over 1 year ago

What's Changed

Support for extracting from longer documents see documentation: https://eyurtsev.github.io/kor/document_extraction.html

Full Changelog: https://github.com/eyurtsev/kor/compare/0.7.0...0.8.0

kor - Version 0.7.0

Published by eyurtsev over 1 year ago

What's Changed

from langchain.prompts import PromptTemplate

DEFAULT_PROMPT_TEMPLATE = PromptTemplate(
    input_variables=["format_instructions", "type_description"],
    template=(
        "Write some stuff here n\n"
        "{type_description}\n\n"
        "{format_instructions}"
        "Suffix heren\n"
    ),
)


chain = create_extraction_chain(llm, schema, instruction_template=DEFAULT_PROMPT_TEMPLATE)

print(chain.prompt.format_prompt(text='hello').to_string())

Full Changelog: https://github.com/eyurtsev/kor/compare/0.6.1...0.7.0

kor - Version 0.6.1

Published by eyurtsev over 1 year ago

What's Changed

Bug fixes:

New Contributors

Full Changelog: https://github.com/eyurtsev/kor/compare/0.6.0...0.6.1

kor - Version 0.6.0

Published by eyurtsev over 1 year ago

What's Changed

  • Visitors accept **kwargs
  • Type-descriptors have been changed to be immutable
  • Added more documentation

Full Changelog: https://github.com/eyurtsev/kor/compare/0.5.1...0.6.0

kor - Version 0.5.1

Published by eyurtsev over 1 year ago

What's Changed

  • Add input formatting argument to create_extraction_chain. This may help make the extraction more robust for text containing a lot of whitespace / multiple paragraphs.
  • Added kor.version
  • Added more sphinx documentation

Full Changelog: https://github.com/eyurtsev/kor/compare/0.5.0...0.5.1

kor - Version 0.5.0

Published by eyurtsev over 1 year ago

What's Changed

Full Changelog: https://github.com/eyurtsev/kor/compare/0.4.0...0.5.0

kor - Version 0.4.0

Published by eyurtsev over 1 year ago

What's Changed

  • Integration with Langchain via an LLMChain
  • Added support for CSV, JSON encodings
  • Swapped default encoding to use CSV (less flexible, but anecdotally more accurate)
  • All schema nodes are no longer assumed to be lists by default. Instead the many attribute has been set to False
  • However, due to lack of validation and details of XML encoding, XML encoding will still output everything as lists.
  • Renamed type descriptors

Breaking Changes

Public API for extraction has changed completely to instead expose an LLMChain.

New Contributors

Full Changelog: https://github.com/eyurtsev/kor/compare/0.3.0...0.4.0

kor - Version 0.3.0

Published by eyurtsev over 1 year ago

What's Changed

  • Integrated with langchain
  • Added test coverage for code in preparation for feature work

Breaking changes

  • Removed kor adapters on top of open AI models, these will be maintained by langchain.

New Contributors

Full Changelog: https://github.com/eyurtsev/kor/compare/0.2.0...0.3.0

kor - Version 0.2.0

Published by eyurtsev over 1 year ago

Added documentation and cleaned up some old code.
Small feature set to gauge interest.
Code is hardly tested at the moment.

kor - Draft Release (v 0.0.1)

Published by eyurtsev over 1 year ago

Draft release only available for a few folks. Has some documentation and a somewhat stabilized API.