Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
solid_agent (0.1.1)
activeagent (>= 0.1.0)
activeagent (>= 1.0.0)
activerecord (>= 7.0)
activesupport (>= 7.0)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $ gem install solid_agent
Generate a new agent with context support:

```bash
$ rails generate solid_agent:agent WritingAssistant --context --context_name conversation --contextable user
$ rails generate solid_agent:agent WritingAssistant --context --context_name conversation --contextual user
```

### HasContext - Persistent Conversation History
Expand All @@ -50,10 +50,10 @@ Add database-backed context management to your agents:
class WritingAssistantAgent < ApplicationAgent
include SolidAgent::HasContext

has_context :conversation, contextable: :user
has_context :conversation, contextual: :user

def improve
load_conversation(contextable: current_user)
load_conversation(contextable: current_user) # contextable is the polymorphic association
add_conversation_user_message(params[:message])
prompt messages: conversation_messages
end
Expand Down
Loading