cover/Elixir.Msg.html| 1 | defmodule Msg do |
|
| 2 | def user(text) do |
|
| 3 | 101 | %{role: "user", content: text} |
| 4 | end |
|
| 5 | |
|
| 6 | def assistant(text) do |
|
| 7 | :-( |
%{role: "assistant", content: text} |
| 8 | end |
|
| 9 | |
|
| 10 | def invoke(id, name, input) do |
|
| 11 | :-( |
%{ |
| 12 | role: "assistant", |
|
| 13 | content: [%{type: "tool_use", id: id, name: name, input: input}] |
|
| 14 | } |
|
| 15 | end |
|
| 16 | |
|
| 17 | def result(id, content) do |
|
| 18 | 129 | %{ |
| 19 | role: "user", |
|
| 20 | content: [%{type: "tool_result", tool_use_id: id, content: content}] |
|
| 21 | } |
|
| 22 | end |
|
| 23 | end |
|
| Line | Hits | Source |
|---|