Skip to content

Conversation

@lukehinds
Copy link

This introduces a more customizable prompt ability.

It is now possible to set system context etc along with parameters

Closes: #7

This introduces a more customizable prompt ability.

It is now possible to set system context etc along with parameters

Closes: #7
@lukehinds lukehinds requested a review from jhrozek October 14, 2024 09:19
Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

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

let's merge this, I'll rebase my PR atop and submit the nits I had as small cleanups

bodyBytes, _ := io.ReadAll(resp.Body)

if resp.StatusCode != http.StatusOK {
bodyBytes, _ := io.ReadAll(resp.Body)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in another PR it would be nice to return structured errors so that the caller would do errors.As and would retrieve the body if needed (I agree having the body in-line as string is easier to debug in a tiny app)

Copy link
Author

Choose a reason for hiding this comment

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

sounds good!

@lukehinds lukehinds merged commit 25bad2e into main Oct 14, 2024
@lukehinds lukehinds deleted the std-prompt branch October 14, 2024 20:44
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.

Stanardised prompt interface

3 participants