llmtuner.llms.gpt

Classes

GPTChatter

Module Contents

class llmtuner.llms.gpt.GPTChatter(filename='')[source]
name = 'plaingpt'[source]
history = [][source]
chat(prompt, usehisto=0, store=True, printstyle=False)[source]

Getting a response from the client, * ‘usehisto’: adding the number of prior exchanges as chat history to the query * ‘store’: storing query and result to history * ‘printstyle’: if True returning answer as linebreaked markdown

reset_history()[source]
get_last_answer()[source]
save_history(outfilename)[source]
load_history(infilename)[source]
static _print_answer(answer)[source]