Skip to content

Reorganize stdlib #285

@nrfulton

Description

@nrfulton
mellea/
  core/
    __init__.py
    base.py
    sampling.py
    backend.py
    formatter.py
  formatters/
      __init__.py <- exports main stuff.
  backends/
    adapters/
        __init__.py <- exports main stuff.
    openai.py
    litellm.py
    ollama.py
    move types.py to model_options.py 
    # other backends probably get moved into contribs or dedicated packages?
  stdlib/
    components/ <- most of what's in stdlib now goes here.
      __init__.py <- exports the components; mellea.stdlib.instruction.Instruction feels annoying.
      instruction.py
      requirement.py
      genslot.py
      document.py moved from base.py
      simple.py moved from base.py
      ... etc. ...
    samplers/
    reqs/
    tools/
  templates/ <- works as does now.
  helpers/ <- works as does now.

The contribs package then follows a similar structure to stdlib:

mellea-contribs/
  lib/
    components/
    samplers/
    reqs/
    tools/
    misc/ <- catch-all for other stuff
  backends/

Accumulated Proposed changes

  • ModelOutputThunk._context should be the actual context not a list.
  • ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions