Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All v0.2 + data.inline plugin implementations #46

Merged
merged 8 commits into from
Feb 2, 2024
Merged

All v0.2 + data.inline plugin implementations #46

merged 8 commits into from
Feb 2, 2024

Conversation

dobarx
Copy link
Contributor

@dobarx dobarx commented Jan 17, 2024

@dobarx dobarx added this to the v0.2 milestone Jan 17, 2024
@dobarx dobarx requested a review from traut January 17, 2024 18:35
@dobarx
Copy link
Contributor Author

dobarx commented Jan 18, 2024

Update

Implemented content.frontmatter plugin (#47)

if err != nil {
return "", err
}
buf.WriteString("* ")
Copy link
Member

@traut traut Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to support the ordered lists, we can drop this line and either

  • delegate the responsibility of setting 1. or * to the template string author
  • adding ordered bool attribute (false by default) to the block and setting ordered / unordered list prefixes ourselves.

I lean towards the 2nd option - the new ordered attribute. What do you think?

Copy link
Contributor Author

@dobarx dobarx Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about keeping it similar with other content plugins naming?

format = "ordered"

default would be "unordered"

Copy link
Member

@traut traut Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, it seems strange to have a string enum for a boolean flag, isn't it?

yeah, ok, we can do a task list there as well!

how about format values ordered, unordered, tasklist? wth unordered default value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it more as a ListType. There is also alphabetical list type supported by md.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's start with a simpler Github flavor for now, with the ability to extend if needed. I think ordered, unordered and tasklist should be enough for now.

If more extensive ordering / formatting is needed, the users can use jq / content.text with markdown code

return "", errors.New("prompt is required in invocation")
}
params := client.ChatCompletionParams{
Model: defaultModel,
Copy link
Member

@traut traut Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, that's great -- could you please make it another content attribute? Just a string model attribute that accepts the name of the model and defaults to gpt-3.5-turbo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

@dobarx dobarx requested a review from traut January 26, 2024 08:04
Copy link
Member

@traut traut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Feel free to merge in when ready!

@dobarx dobarx merged commit e7a884c into main Feb 2, 2024
@dobarx dobarx deleted the v2_plugins branch February 2, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants