mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
feat: add database tables and API routes for agentic chat feature (#17570)
Backend portion of experimental `AgenticChat` feature: - Adds database tables for chats and chat messages - Adds functionality to stream messages from LLM providers using `kylecarbs/aisdk-go` - Adds API routes with relevant functionality (list, create, update chats, insert chat message) - Adds experiment `codersdk.AgenticChat` --------- Co-authored-by: Kyle Carberry <kyle@carberry.com>
This commit is contained in:
6
coderd/database/migrations/testdata/fixtures/000319_chat.up.sql
vendored
Normal file
6
coderd/database/migrations/testdata/fixtures/000319_chat.up.sql
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
INSERT INTO chats (id, owner_id, created_at, updated_at, title) VALUES
|
||||
('00000000-0000-0000-0000-000000000001', '0ed9befc-4911-4ccf-a8e2-559bf72daa94', '2023-10-01 12:00:00+00', '2023-10-01 12:00:00+00', 'Test Chat 1');
|
||||
|
||||
INSERT INTO chat_messages (id, chat_id, created_at, model, provider, content) VALUES
|
||||
(1, '00000000-0000-0000-0000-000000000001', '2023-10-01 12:00:00+00', 'annie-oakley', 'cowboy-coder', '{"role":"user","content":"Hello"}'),
|
||||
(2, '00000000-0000-0000-0000-000000000001', '2023-10-01 12:01:00+00', 'annie-oakley', 'cowboy-coder', '{"role":"assistant","content":"Howdy pardner! What can I do ya for?"}');
|
Reference in New Issue
Block a user