had to make it executable with chmod +x tgpt-linux-amd64
ran it in a sandbox (firejail) to further add to safety
you have to provide a search term or expression to it when running the command
I took the example given by the github-page. It is: “Write a simple programme in golang”.
So this is the terminal-output it came up with
(complete output includig firejail status messages; fish syntax):
rosika2@debian ~/D/E/zu_ChatGPT>
firejail --private=(pwd) ./tgpt-linux-amd64 'Write a simple programme in golang'
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc
Warning: networking feature is disabled in Firejail configuration file
** Note: you can use --noprofile to disable default.profile **
Parent pid 2017, child pid 2018
Child process initialized in 87.62 ms
Write a simple programme in golang
Sure, here's a simple program in Go that prints "Hello, world!" to the console:
package main
import "fmt"
func main() {
fmt.Println("Hello, world!")
}
To run this program, save it to a file with a .go extension (e.g. hello.go) and then run the following command from the terminal:
go run hello.go
This will compile and execute the program, and you should see the output Hello, world! printed to the console.
Parent is shutting down, bye...
rosika2@debian ~/D/E/zu_ChatGPT> echo $status
0
The advantage of running tgpt in a terminal (according to the author)is :
tgpt is a cross-platform cli (commandline) tool that lets you use ChatGPT 3.5 in Terminal without API KEYS.
It communicates with the Backend of Bai chatbot (https://chatbot.theb.ai/).
Its written in Go.
Well, I´m glad I tried it. It seems to work just fine.
Yet I haven´t done any further experimenting so far.
Thanks for sharing your experience, sadly my German language skills are limited (to ordering beer) so missed some of the dialogue.
Think this could be a path towards the future so will become more important.
downloaded the latest release (1.2.1) of tgpt from Release tgpt 1.2.1 · aandrew-me/tgpt · GitHub 2
this one can be used as a standalone executable
scanned it with clamav (everything´s O.K)
logged into Debian (virtual machine)
put the file there in a dedicated directory
had to make it executable with chmod +x tgpt-linux-amd64
ran it in a sandbox (firejail) to further add to safety :wink:
you have to provide a search term or expression to it when running the command
Tried the following
nevj@trinity:~
$ firejail ~/bin/tgpt-linux-amd64 'Write an R function to convert integers to character strings'
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc
Warning: networking feature is disabled in Firejail configuration file
** Note: you can use --noprofile to disable default.profile **
Parent pid 7764, child pid 7765
Child process initialized in 44.61 ms
Write an R function to convert integers to character strings
Here's an R function that takes an integer as input and returns a character string:
int_to_char <- function(x) {
return(as.character(x))
}
You can use this function to convert integers to character strings. For example:
> int_to_char(123)
[1] "123"
> int_to_char(-456)
[1] "-456"
This function simply uses the as.character() function to convert the input integer to a character string.
Parent is shutting down, bye...
nevj@trinity:~
Yes that may be useful. I usually ask google when I want to find out how to do something in R. What you dont get with tgpt is all the authors comments that go along with the solution.
Sorry for that, Paul.
By “dialogue”, did you mean the gnulinux.ch-site I was referring to?
Yes, that´s in German. If you´re using firefox as a browser you could use the TranslateLocally addon, if you´re interested.
I just might add that the firejail part was just for security reasons on my part. Of course running the executable in a terminal would´ve worked without sandboxing as well.
I´ve made it a habit of running untrusted or unknown programmes in the sandbox first, just to be sure. Once I know it´s all right I may skip sandboxing it in the future.
I have to add that firejail ueses the default profile whenever there´s no dedicated profile for a certain programme available.
The default.profile doesn´t really provide a huge amount of security, but it´s better than nothing.
That said you can create your own profile for any application which may improve security dramatically.
Yes I use translate a great deal, but sometimes you get really funny results.
Thanks to you both I gain so much varied knowledge in areas I know nothing
Yes, you´re right. I noticed that, too on occasions.
Well, that might be blamed on the Bergamot project, I guess.
But it´s a convenient way for quickly getting the desired page to use your favourite language (provided it´s available).
For better quality translations there´s the trans shell available.
Yes, but normally the messages firejail writes out to the terminal are enough for me.
Well, I guess I haven´t come across any misbehaving processes yet (which is a good thing ).
There are other logs, too.
I know that firejail writes to /var/log/syslog. Yet I took a closer look at the man pages and also involved ChatGPT in my quest:
Yes, Firejail does log messages about processes that are running inside it, including any misbehavior or errors that may occur.
By default, Firejail logs to the system log, which is usually located at /var/log/syslog. You can view the Firejail logs by running the following command in the terminal:
sudo grep firejail /var/log/syslog
This will show you all the log messages related to Firejail.
You can also filter the logs by process name, using the --name option. For example, to show logs only for Firefox running in Firejail, you can use the following command:
sudo grep --name="firefox" /var/log/syslog
This command will display all log messages for the process named firefox. You can replace firefox with the name of any other process that you want to filter the logs for.
Alternatively, you can also configure Firejail to log to a separate file instead of the system log.
To do this, you need to edit the Firejail configuration file /etc/firejail/firejail.config and add the following line:
nolog = false
This will enable logging to a file named firejail.log in the user’s home directory.
You can change the log file name and location by modifying the log option in the configuration file.
Ah, the latter one was new to me.
I haven´t tried it out yet but surely will do so in the near future.