Skip to content

I can't get any agent to run in the console #5

@ruprict

Description

@ruprict

Steps to reproduce
Rails 8.1.2
Ruby 3.4.4

rails new agents-app
cd agents-app
bundle add "ruby_llm-agents"
rails g ruby_llm_agents:install
rails db:migrate

# btw, this is what the post install directions say which creates a MyAgentAgent class
rails generate ruby_llm_agents:agent MyAgent query:required
export OPENAI_API_KEY=<my api key> # I have put this in .env too
# Change model to "gpt-4o"

rails c
agents-app(dev):001> result = MyAgentAgent.call(query:"hi")
[RubyLLM::Agents::Pipeline] Failed to create running execution record: unknown attribute 'attempts_count' for RubyLLM::Agents::Execution.
[RubyLLM::Agents::Pipeline] Failed to record execution: unknown attribute 'attempts_count' for RubyLLM::Agents::Execution.
(agents-app):1:in '<main>': Missing configuration for OpenAI: openai_api_key (RubyLLM::ConfigurationError)

So, issue with attempts_count and it doesn't see the OPENAI_API_KEY env var. Apologies if I am doing something dim.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions