Skip to content

Commit 8d8fa19

Browse files
committed
Update documentation
1 parent 79ca170 commit 8d8fa19

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

docs/source/magics.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ Leverage the large language models to assist in your development process. Curren
2828
%%xassist model
2929
prompt
3030
31+
- Reset model and clear chat history
32+
33+
.. code::
34+
35+
%%xassist model --refresh
36+
3137
- Example
3238

3339
.. image:: gemini.png

src/xmagics/xassist.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ namespace xcpp
100100

101101
if(model == "gemini")
102102
{
103-
out << "{ \"role\": \"" << user << "\", \"parts\": [ { \"text\": " << serializedCell << "}]}\n";
103+
out << "{ \"role\": \"" << user << R"(", "parts": [ { "text": )" << serializedCell << "}]}\n";
104104
}
105105
else
106106
{
107-
out << "{ \"role\": \"" << user << "\", \"content\": " << serializedCell << "}\n";
107+
out << "{ \"role\": \"" << user << R"(", "content": )" << serializedCell << "}\n";
108108
}
109109

110110
out.close();
@@ -275,7 +275,8 @@ namespace xcpp
275275
xcpp::APIKeyManager::saveApiKey(model, cell);
276276
return;
277277
}
278-
else if (tokens[2] == "--refresh")
278+
279+
if (tokens[2] == "--refresh")
279280
{
280281
xcpp::ChatHistory::refresh(model);
281282
return;

0 commit comments

Comments
 (0)