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

Fix sample code and add claude v3 code generation #220

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mnmcho
Copy link

@mnmcho mnmcho commented Apr 2, 2024

2 changes:

Change 1: Fixing incorrect sample code

image

Above result from sample generated code is incorrect. It should be 'P003' and '2023-04-23'.

image
image

The changed code is also generated from Claude v2 but it gets the result correct.

image

Change 2: Adding Claude v3 generated code for comparison / easy access to users who want to play with Claude v3 in this particular notebook.

Changed prompt a little bit to avoid Claude v3 from using pandas.

Claude v3 also generates desired output, so I included sample as well.

image

Copy link
Contributor

@chpecora chpecora left a comment

Choose a reason for hiding this comment

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

Could you add a note about the messages API vs text completion API being used to invoke the model in the Claude 2 vs Claude 3 sections, highlighting why that body structure was used instead of the format used in the above Claude 2 example. i.e. Messages API is required for Claude 3 and is backward compatible with Claude 2.1 and below.

@mnmcho
Copy link
Author

mnmcho commented Apr 25, 2024

@chpecora Added! Is there any other points about messages API that we should be adding?

@mnmcho mnmcho requested a review from chpecora April 25, 2024 22:51
Copy link
Contributor

@chpecora chpecora left a comment

Choose a reason for hiding this comment

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

looks good, thanks!

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.

None yet

2 participants