sblakey / llm-bedrock-anthropic

Plugin for https://llm.datasette.io/en/stable/ to enable talking with Claude Instant and ClaudeV2 models on AWS Bedrock
Apache License 2.0
31 stars 8 forks source link

add haiku support #11

Closed raphaelmansuy closed 6 months ago

raphaelmansuy commented 6 months ago

I haved added AWS Bedrock Haiku

sblakey commented 6 months ago

Thank you! Merging in, testing locally, and will try to push a release this AM.

sblakey commented 6 months ago

I renamed the prompt aliases to start with bedrock-, and changed the one-letter alias h to bh, for consistency with the other aliases in this plugin.

Here's a test I ran locally: ❯ llm -m bh 'I have a table with sales data, including the salesperson\'s name in column A, the product category in column B, the sales amount in column C, and the date of sale in column D. I want to calculate the total sales amount for each salesperson, but only for sales of products in the "Electronics" category that occurred in the month of January. Can you help me with the Excel formula to achieve this?' Certainly! To calculate the total sales amount for each salesperson for sales of products in the "Electronics" category that occurred in the month of January, you can use the following Excel formula:

=SUMIFS(C:C, A:A, UNIQUE(A:A), B:B, "Electronics", D:D, ">="&DATE(YEAR(TODAY()),1,1), D:D, "<="&DATE(YEAR(TODAY()),1,31))

Let's break down the formula:

  1. C:C: This is the range of cells containing the sales amount data.
  2. A:A: This is the range of cells containing the salesperson's name.
  3. UNIQUE(A:A): This function returns a unique list of salesperson names.
  4. B:B: This is the range of cells containing the product category data.
  5. "Electronics": This is the specific category you want to filter for.
  6. D:D: This is the range of cells containing the sale date data.
  7. >="&DATE(YEAR(TODAY()),1,1): This part of the formula filters for dates in January of the current year.
  8. <="&DATE(YEAR(TODAY()),1,31): This part of the formula filters for dates up to the 31st of January of the current year.

The SUMIFS function is used to sum the sales amount values that meet the specified criteria.

To use this formula, simply enter it in a cell, and it will calculate the total sales amount for each salesperson for the specified criteria.