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

feat: teach vscode/fiddle to explain when we drop information #897

Merged
merged 3 commits into from
Sep 21, 2024

Conversation

sxlijin
Copy link
Collaborator

@sxlijin sxlijin commented Aug 24, 2024

when there's an explanation to be shown, the information icon is clickable and toggles showing the explanation:

image

if there's no explanation, the information icon tooltip just shows "parsing succeeded" and clicking it does nothing

image

Copy link

vercel bot commented Aug 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baml ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 21, 2024 2:58am

@hellovai
Copy link
Contributor

Looks interesting! Let's chat before merge to discuss edge cases!

@sxlijin
Copy link
Collaborator Author

sxlijin commented Sep 20, 2024

use this file to repro it on promptfiddle (and swap out for openai/gpt-4o-mini for no errors)

// This is a BAML config file, which extends the Jinja2 templating language to write LLM functions.

class Recipe {
  name string
  ingredients Ingredient[]
}
enum IngredientUnit {
  Tbsp
  Lbs
  Grams
  }

class Ingredient {
  name string
  amount int | float
  unit IngredientUnit
}

function ExtractRecipe(subject: string) -> Recipe {
  // see clients.baml
  client "openai/gpt-3.5-turbo"

  // The prompt uses Jinja syntax. Change the models or this text and watch the prompt preview change!
  prompt #"
        {# special macro to print the output instructions. #}
    {{ ctx.output_format }}

    
    Give me a recipe for {{ subject }}
  "#
}

test Test1 {
  functions [ExtractRecipe]
  args {
    subject "beef stew"
  }
}

@sxlijin sxlijin changed the title implement mechanism to show explanation feat: explain when we drop information Sep 21, 2024
@sxlijin sxlijin changed the title feat: explain when we drop information feat: teach vscode/fiddle to explain when we drop information Sep 21, 2024
@sxlijin sxlijin added this pull request to the merge queue Sep 21, 2024
Merged via the queue into canary with commit 93e2b9b Sep 21, 2024
9 of 10 checks passed
@sxlijin sxlijin deleted the sam/parsing-preview branch September 21, 2024 02:52
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