rosgpt4all.gpt

Classes

GPTNode

GPT4All ROS Node.

Functions

main()

Module Contents

class rosgpt4all.gpt.GPTNode

Bases: rclpy.node.Node

GPT4All ROS Node.

running = True
socket = None
socket_clients = []
queue = []
gpt_abort = False
model_name
model_path
allow_download
socket_path
device
system_prompt
prompt
eof_indicator
max_tokens
temp
top_k
top_p
repeat_penalty
repeat_last_n
n_batch
n_threads
ngl
verbose
sub
pub_generator
pub
pub_sentence
sentence = ''
model
session_thread
sock_thread
gpt_callback(token_id: int, response: str)

Callback to handle self.gpt_abort signal.

shutdown()

Cleanup running threads.

parameter_callback(params)

ROS dynamic reconfigure handler for RQT Gui

topic_callback(msg)

Pass incoming message to GPT4ALL.

prompt_cleanup(prompt)

Removes context until the end from prompt.

session()

Process incoming queue messages by GPT4ALL.

token_handler(token)

Publishes to the generator and sentence publishers.

publish(s, pub)

Publish GPT4ALL response.

print(s)

Print to stdout and socket.

socket_server()

Serves GPT output to a AF_UNIX socket.

socket_send(bytes)

Send bytes to all connected clients. Also maintains the self.socket_clients list.

rosgpt4all.gpt.main()