You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

save-load-session.md 724 B

1234567891011121314
  1. # Save/Load Chat Session
  2. Generally, the chat session could be switched, which requires the ability of loading and saving session.
  3. When building a chat bot app, it's **NOT encouraged** to initialize many chat sessions and keep them in memory to wait for being switched, because the memory comsumption of both CPU and GPU is expensive. It's recommended to save the current session before switching to a new session, and load the file when switching back to the session.
  4. The API is also quite simple, the files will be saved into a directory you specified. If the path does not exist, a new directory will be created.
  5. ```cs
  6. string savePath = "<save dir>";
  7. session.SaveSession(savePath);
  8. session.LoadSession(savePath);
  9. ```

C#/.NET上易用的LLM高性能推理框架,支持LLaMA和LLaVA系列模型。