Skip to content

Instantly share code, notes, and snippets.

@alexadark
Created March 22, 2024 10:48
Show Gist options
  • Save alexadark/ada130e44f69173eeb723a0770a5274c to your computer and use it in GitHub Desktop.
Save alexadark/ada130e44f69173eeb723a0770a5274c to your computer and use it in GitHub Desktop.
langbase API
//this is the one that works, which the one that was in copy yesterday
curl https://api.langbase.com/beta/generate \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer cee91a08-db3a-467e-aad4-67bca954b078' \
-d '{ "prompt": "" }'
//the one that you wrote me, and that is in the website and in copy today, doesn't work
curl https://api.langbase.com/beta/generate \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer cee91a08-db3a-467e-aad4-67bca954b078' \
-d '{
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"variables": [
{
"name": "<variableKey>",
"value": "<variableValue>"
}
]
}'
Neither the one that was there before (the one with prompt wrapping the second one)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment