Skip to content

LLM::Bot#chat should raise PromptError #80

@0x1eef

Description

@0x1eef

Context

This is a scenario where our API is lacking.
A PromptError should be raised as soon as we are given a prompt object we don't understand:

#!/usr/bin/env ruby

llm = LLM.openai key: ENV["OPENAI_SECRET"]
bot = LLM::Bot.new(llm)
bot.chat(Object.new) # PromptError should be raised here
bot.messages.to_a    # But instead it is raised here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions