-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support Claude's prefill feature #2
Labels
enhancement
New feature or request
Comments
simonw
added a commit
that referenced
this issue
Jan 31, 2025
Documented in the new model options section (partly maintained by Cog): https://github.com/simonw/llm-anthropic/blob/ffd23912afaa0ba7674c6f0e16229bb1eeced06a/README.md#model-options |
simonw
added a commit
that referenced
this issue
Jan 31, 2025
Example usage: llm -m claude-3.5-sonnet -o prefill '{' 'Fun data about pelicans' {
"Pelican Fun Facts": [
{
"Size": "One of the largest flying birds, with wingspans up to 10 feet (3 meters)",
"Pouch": "Can hold up to 3 gallons (11 liters) of water - more than 3 times what their stomach can hold",
"Diet": [
"Can eat up to 4 pounds (1.8 kg) of fish per day",
"Don't store fish in their pouch - it's just used as a fishing net"
],
"Cool Features": [
"Can dive from 60+ feet high to catch fish",
"Have internal air sacs that help them float and protect them during dives",
"Can live up to 25-30 years in the wild",
"All young pelicans are born blind"
],
"Social Behavior": "Often fish cooperatively in groups, herding fish into shallow water",
"Interesting Tidbit": "Baby pelicans will eat up to 150 pounds of fish before they can fly"
}
]
} |
More complex example (from the README): llm -m claude-3.5-haiku 'Short python function describing a pelican' \
-o prefill '```python' \
-o hide_prefill true \
-o stop_sequences '```' def describe_pelican():
"""
Returns a brief description of a pelican's characteristics.
Returns:
str: A descriptive string about pelicans
"""
return "A large seabird with a distinctive long, pouched bill, known for diving into water to catch fish and often found along coastal areas." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/prefill-claudes-response
The text was updated successfully, but these errors were encountered: