你从来不建建建,它来自 api.models.create() 用于新对话,或 api.models.get(id) 将恢复你所享受的享受。
表面表面
| 成员 | 功能 |
|---|---|
| ({投入,产出}) | 问,这是花掉的钱 |
| getHistory() | 阅读所说的话,但不增加。 |
| destroy() | 删除会议及其信息。 |
| 数据数据数据数据数据 | 配置, 以平面物体 的形式 。 |
const assistant = await api.models.create({ model: "gemini-3.5-flash" });
assistant.id; // keep this — it is all you need to come back
assistant.model;
assistant.settings;
assistant.schema;
assistant.memory; // true unless you asked otherwise
assistant.title; // named by the first message
assistant.createdAt;
assistant.updatedAt;assistant = api.models.create(model="gemini-3.5-flash")
assistant.id # keep this — it is all you need to come back
assistant.model
assistant.settings
assistant.schema
assistant.memory # True unless you asked otherwise
assistant.title # named by the first message
assistant.created_at
assistant.updated_at使用一个形状的形状
// Open, and remember which conversation this is
const assistant = await api.models.create({ model: "gemini-3.5-flash" });
await db.save({ userId, sessionId: assistant.id });
// Ask, as many times as the conversation needs
await assistant.generate({ inputs: [{ type: "text", content: "…" }] });
// Later, anywhere, any process
const again = await api.models.get(await db.load(userId));
// And when it is over
await again.destroy();# Open, and remember which conversation this is
assistant = api.models.create(model="gemini-3.5-flash")
db.save(user_id=user_id, session_id=assistant.id)
# Ask, as many times as the conversation needs
assistant.generate(inputs=[{"type": "text", "content": "…"}])
# Later, anywhere, any process
again = api.models.get(db.load(user_id))
# And when it is over
again.destroy()对象是一个控点, 不是对话框
对话在服务器上。 同一身份的两个把手是相同的对话, 丢掉一个也没有丢失任何东西。
无法改变的东西
模式、设置和模式在会话创建时是固定的,没有办法改变它们——以不同的方式回答,再打开另一会,这是深思熟虑的:规则在中途改变的谈话是历史不再解释答案的谈话。