freeGPTFix
  • Welcome
  • Getting Started
    • Quickstart
  • Client
    • gpt3
    • gpt3.5
    • gpt4
    • gpt4o
    • gemini
    • prodia
    • pollinations
  • Lib
    • models
    • proxy
    • helper
    • room
      • ConnectRoles
      • ConnectModel
  • roles
    • roles
    • Undertale
      • SANS
      • PAPYRUS
      • GASTER
      • ALPHIS
    • HXH
      • GON
      • KILLUA
      • MERUEM
      • NETERO
    • KimetsuNoYaiba
      • RENGOKU
    • Other
      • FRIEND
      • HISTORIAN
      • PSYCHIATRIST
  • Change Log
    • Versions
      • 1.3.0
      • 1.2.0
  • Reference
    • Helpers
    • Contacts
Powered by GitBook
On this page
  1. Lib

room

Room - probably the most interesting feature introduced in version 1.1.0 (the first version to include Room). Room creates a space for interacting with the AI. While you're in the room, the AI retains memory and chat history, but you can also upload your own chat history.

Examples of creating a simple room:

from freeGPTFix.lib.room import Room

with Room() as room:
	while True:
		text = input("> ")
		resp = room.send_message(text)
		print(resp["reply"])
from freeGPTFix.lib.room import Room

with Room() as room:
	while True:
		text = input("> ")
		resp = room.send_message(text)
		print(resp["reply"])
		room.saveHistory() # save history

Examples of loading history into a room (history that was saved using room.saveHistory()):

from freeGPTFix.lib.room import Room

with Room(history_path="./path/to/yourHistory.json") as room:
	while True:
		text = input("> ")
		resp = room.send_message(text)
		print(resp["reply"])
		room.saveHistory()

In this example, we load the history into the room. After making a request and receiving a response from GPT, we save this history back to the file, and this process repeats after each request.

PrevioushelperNextConnectRoles

Last updated 9 months ago