Mercurial Hosting > lang
comparison src/lib/Chat.luan @ 6:025bb19b65b1
use claude
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 17 Jul 2025 23:19:22 -0600 |
parents | a970b7a01a74 |
children | 46097e607701 |
comparison
equal
deleted
inserted
replaced
5:a970b7a01a74 | 6:025bb19b65b1 |
---|---|
38 } | 38 } |
39 end | 39 end |
40 | 40 |
41 function Chat.new(chat) | 41 function Chat.new(chat) |
42 chat.updated = chat.updated or time_now() | 42 chat.updated = chat.updated or time_now() |
43 chat.ai_name = chat.ai_name or "chatgpt" | 43 chat.ai_name = chat.ai_name or "claude" |
44 chat.ai = Ai[chat.ai_name]["Chat.luan"] or error() | 44 chat.ai = Ai[chat.ai_name]["Chat.luan"] or error() |
45 | 45 |
46 function chat.save() | 46 function chat.save() |
47 local doc = to_doc(chat) | 47 local doc = to_doc(chat) |
48 Db.save(doc) | 48 Db.save(doc) |