remove input from InstructionPrompt (was Alpaca-specific, AlpacaPromptFormat still supports it)
improve error reporting when using exponent backoff retries
add text prompt format. Use simple text prompts, e.g. with OpenAIChatModel:
const textStream = await streamText(
new OpenAIChatModel({
model: "gpt-3.5-turbo",
}).withTextPrompt(),
"Write a short story about a robot learning to love."
);
add .withTextPromptFormat to LlamaCppTextGenerationModel for simplified prompt construction:
const textStream = await streamText(
new LlamaCppTextGenerationModel({
// ...
}).withTextPromptFormat(Llama2PromptFormat.text()),
"Write a short story about a robot learning to love."
);
add FunctionListToolCallPromptFormat to simplify tool calls with text models
add .asToolCallGenerationModel() to OllamaTextGenerationModel to simplify tool calls:
const { tool, args, toolCall, result } = await useTool(
new OllamaTextGenerationModel({
model: "mistral",
temperature: 0,
}).asToolCallGenerationModel(FunctionListToolCallPromptFormat.text()),
calculator,
"What's fourteen times twelve?"
);
input
fromInstructionPrompt
(was Alpaca-specific,AlpacaPromptFormat
still supports it)OpenAIChatModel
:.withTextPromptFormat
toLlamaCppTextGenerationModel
for simplified prompt construction:FunctionListToolCallPromptFormat
to simplify tool calls with text models.asToolCallGenerationModel()
toOllamaTextGenerationModel
to simplify tool calls: