#chatgpt #chat-bot #openai #gpt #api-bindings

yanked loreweaver

Managing long conversations with ChatGPT

6 releases

0.2.3 Oct 27, 2023
0.2.1 Oct 27, 2023
0.1.3 Oct 23, 2023

#8 in #chatbot

29 downloads per month

MIT license

42KB
674 lines

Loreweaver

github github crates.io docs.rs build status

Loreweaver is a flexible out-of-the-box library designed to interact with ChatGPT, with an emphasis on managing long conversations exceeding the maximum token limit of a model, ensuring a continuous and coherent user experience.

Check out the official Loreweaver Discord Bot purpously built based on this library!

Implementation

This library is a rust implementation of OpenAI's Tactic for handling long conversations with ChatGPT that span beyond a GPT model's maximum context token limit.

Once a certain threshold of context tokens is reached, the library will summarize the entire conversation and begin a new conversation with the summarized context appended to the system instructions.

The library is designed to be as flexible as possible, allowing you to easily integrate it into your own projects.

Use Cases

  • Text-Based RPGs: Crafting coherent and persistently evolving narratives and interactions in text-based role-playing games.

  • Customer Support Chatbots: Developing chatbots that remember past user interactions and provide personalized support.

  • Educational Virtual Tutors: Implementing AI tutors that remember student interactions and tailor assistance accordingly.

  • Healthcare Virtual Assistants: Creating healthcare assistants that provide follow-up advice and reminders based on past user health queries.

  • AI-Driven MMO NPC Interactions: Enhancing MMO experiences by enabling NPCs to have contextually relevant interactions with players based on past encounters.

How to Use

Follow the crate level documentation for a detailed explanation of how to use the library.

Contribution

If you are passioniate about this project, please feel free to fork the repository and submit pull requests for enhancements, bug fixes, or additional features.

License

Loreweaver is distributed under the MIT License, ensuring maximum freedom for using and sharing it in your projects.

Dependencies

~37–55MB
~793K SLoC