Open simonw opened 4 months ago
One option could be a --raw
mechanism something like this:
llm -m claude-3-haiku --raw '[
{"role": "user", "content": "New Apple trackpad breeds nasty fungus"},
{"role": "assistant", "content": "tech"},
{"role": "user", "content": "I do not like how the world is going"},
{"role": "assistant", "content": "opinion"},
{"role": "user", "content": "Potential war brewing in Spain"},
{"role": "assistant", "content": "world"},
{"role": "user", "content": "Who will be the next senator from Vermont?"},
{"role": "assistant", "content": "usa"},
{"role": "user", "content": "Microsoft release Windows 334"}
]'
How would this be logged? Would these be turned into a conversation with a bunch of responses even though they never actually came back from the LLM itself?
Note that running the above and then following up with llm -c 'French economy set to boom'
would need to trigger the full set of messages to be sent just as if they were stored as a real conversation.
Maybe an extra column on the responses
table could record if a particular response was synthetic or actually came back from an LLM.
For Claude models a common pattern is to provide examples as a bunch of fake user/assistant messages:
llm
doesn't really support this yet - the conversation mechanism is just for when you reply to threads, but there isn't a clean way to feed it a whole bunch of "fake" conversation like this as part of a prompt.