FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour prompt-editor
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
prompt-editor
Posted: Wed May 31, 2023 08:43 AM
Hello friends,
We have released a new program called "prompt-editor."

It is a simple editor that stores standard prompts for ChatGPT, making it easier to edit the questions.

Now, we need to update the DBF file that contains the standard questions over the internet.

What is the simplest way to do this?

Best regards,
Otto

Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: prompt-editor
Posted: Wed May 31, 2023 11:46 AM

Now, we need to update the DBF file that contains the standard questions over the internet.

Ahora, necesitamos actualizar el archivo DBF que contiene las preguntas estándar a través de Internet.

Master Otto, explain better.

Maestro Otto, explíquese mejor.

Thanks.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: prompt-editor
Posted: Wed May 31, 2023 12:49 PM
Hello Joao,

It is a simple program. Standard tasks are stored in the DBF file, as you can see in the second screenshot.

The quality of the prompt is important for the results provided by ChatGPT.

We offer a service where we store standard questions, such as a list of allergens according to Austrian regulations or many others.

We would like to distribute the updates over the internet. I also need a solution for the executable file.

Regards,
Otto








Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: prompt-editor
Posted: Wed May 31, 2023 12:55 PM
... BTW, this is the answer to the shown question:
Code (fw): Select all Collapse
Sure, here are the posts from May 31, 2023, that I found on the FiveTech forum:

"prompt-editor" by Otto. Last post at 12:49 PM.
"hb_CDPSELECT() crash ?" by Jimmy. Last post at 12:32 PM.
"CLASS modification" by Otto. Last post at 7:09 AM.
"Problem with xBrowse" by Armando. Last post at 4:23 AM.
"Fastreport de Cristobal" by mgsoft. Last post at 12:06 PM.
"Como evitar warnings" by JoseAlvarez. Last post at 12:02 PM.
"HBSSL CON FUNCIONES DE DIEGO FAZIO INCLUIDAS" by rterraz. Last post at 7:23 AM​1​​2​.
As for the xBase forum, I've checked several sub-forums but did not find any posts from May 31, 2023. It seems the forum isn't as active as the FiveTech one, or it could be due to the time difference and posts might appear later in the day. It would be a good idea to check the forum again later in the day.
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: prompt-editor
Posted: Wed May 31, 2023 03:53 PM

Fastreport de Cristobal ???????

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: prompt-editor
Posted: Wed May 31, 2023 09:41 PM
Hello friends,
I start testing with these functions:
Code (fw): Select all Collapse
function jsonerzeugen()

    LOCAL cDbf :="INIfiles.dbf"
    LOCAL aData := {}
   LOCAL cJson, nHandle
   
   USE (cDbf) ALIAS MyTable NEW

   DBGOTOP()

   DO WHILE !EOF()
      AADD(aData, GetRecordData())
      DBSKIP()
   ENDDO

   USE

   cJson := hb_jsonEncode(aData)
   
   ? cJson

   nHandle := FCreate("output.json", 0)
   
   FWrite(nHandle, cJson, LEN(cJson))
   
   FClose(nHandle)
 
RETURN
And to read the json fill from the web:
Code (fw): Select all Collapse
  #include "FiveWin.ch"

    function Main()

       local cURL := "https://w...1/output.json"
       local cDownload := ""
         local h
       cDownload := WebPageContents( cURL ) 
 
 
        hb_JsonDecode( StrTran( cDownload, "=>", ":" ), @h )
        xbrowse( h ) 


    return nil

Continue the discussion