Skip to content

make the requirement that parameter names are needed when using generative slots more explicit in the documentation #216

@atinsood

Description

@atinsood

when using generative slots like in the example below

@mellea.generative
def classify_sentiment(text: str) -> Literal["positive", "negative"]:
  """Classify the sentiment of the input text as 'positive' or 'negative'."""

following code does not work,

label = classify_sentiment(m, "label this sentiment")

while this code works

label =  classify_sentiment(m, text="label this sentiment")

it seems like you need to provide the parameter names when calling the generative slots, but its not explicitly pointed out in the documentation. It would be useful to call this out as a requirement in the documentation as well have a comment in the examples that this is expected.

Metadata

Metadata

Assignees

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