OpenAI REST API

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
JHPJHP
Addict
Addict
Posts: 2252
Joined: Sat Oct 09, 2010 3:47 am

OpenAI REST API

Post by JHPJHP »

Hi All,

Moved to My PureBasic Forum; it didn't make sense maintaining two locations.

There were so many improvements over a short span of time that the first version became obsolete almost as soon as it was posted.

With all the AI options available this fell more into a niche category: Those who want to host their own OpenAI REST API server.
Last edited by JHPJHP on Sun Jul 06, 2025 4:15 pm, edited 32 times in total.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
idle
Always Here
Always Here
Posts: 5840
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: ChatGPT REST API

Post by idle »

Thanks JHPJHP,
The speed at which these LLM are progressing, is both fascinating and unsettling at the same time.
I was considering trying it out directly with the compiler so it can fix it's own errors and then run a unit test to verify it's logic.

Hook this up with request response loop and you could end up with an interactive code assistant. what could possibly go wrong! :lol:

Code: Select all


CompilerIf #PB_Compiler_OS =#PB_OS_Windows
  #Compiler = #PB_Compiler_Home+"compilers\pbcompiler.exe"
CompilerElse 
  #Compiler = #PB_Compiler_Home+"compilers/pbcompiler"
CompilerEndIf 

Global tempdir.s

Procedure StartCompiler()
  
  Protected cmd.s,result  
  
   tempdir.s = GetTemporaryDirectory() + "PBTemp"
   
   SetEnvironmentVariable("TEMP",tempdir)
   SetEnvironmentVariable("TMP",tempdir) 
   
   Debug GetEnvironmentVariable("TEMP")  
   Debug GetTemporaryDirectory() 
   
  CompilerIf #PB_Compiler_OS =#PB_OS_Windows
    cmd = "/STANDBY"
  CompilerElse 
    cmd = "-sb"
  CompilerEndIf  
  Debug cmd 
    
  result = RunProgram(#Compiler,cmd,tempdir,#PB_Program_Open|#PB_Program_Read|#PB_Program_Write|#PB_Program_Hide)
  
  ProcedureReturn result 
   
EndProcedure

Procedure StopCompiler(compiler)
  
  Protected cmd.s 
  
  CompilerIf #PB_Compiler_OS =#PB_OS_Windows 
    cmd = "END" 
  CompilerElse 
    cmd = "END"
  CompilerEndIf  
  
  WriteProgramStringN(compiler,cmd)
  WaitProgram(compiler,5000)
  CloseProgram(compiler)
EndProcedure

Procedure SendCompilerCommand(compiler,command$)
  If ProgramRunning(compiler)
    WriteProgramStringN(compiler, command$)
  EndIf
EndProcedure

Procedure.s GetCompilerOutput(compiler)
  If AvailableProgramOutput(compiler)
    ProcedureReturn ReadProgramString(compiler)
  EndIf
EndProcedure

Procedure WaitCompilerReady(compiler)
  Protected out$
  While out$<>"READY" And Left(out$,5)<>"ERROR"
    out$ = GetCompilerOutput(compiler)
    If out$
      Debug out$
    EndIf
  Wend
EndProcedure

Procedure.s CheckSyntax(compiler,code$,bProgress=0) 
  Protected temp$ = GetTemporaryDirectory() 
  Protected source$ = temp$ + "checkcode" 
  Protected out$,error$
  Protected fn = CreateFile(-1,source$+".pb") 
  If fn 
    WriteString(fn,code$,#PB_UTF8)
    CloseFile(fn) 
    SendCompilerCommand(Compiler, "SOURCE"+Chr(9)+source$+".pb")
    SendCompilerCommand(Compiler, "TARGET"+Chr(9)+source$+".exe")
    SendCompilerCommand(Compiler, "COMPILE"+Chr(9)+"PROGRESS"+Chr(9)+"SYNTAX")
    
    While out$ <> "SUCCESS" And Left(out$,5)<>"ERROR"
      out$ = GetCompilerOutput(compiler) 
      If out$ <> "" 
        If bProgress
          PrintN(out$) 
        EndIf   
      EndIf   
    Wend
    
    If Left(out$,5)="ERROR" 
       While out$<>"OUTPUT"+#TAB$+"COMPLETE" 
        out$ = GetCompilerOutput(compiler) 
        If (out$ <> "" And Left(out$,6) <> "OUTPUT")
          error$ + out$  
          If bProgress
            PrintN(out$)
          EndIf   
        EndIf   
      Wend 
      out$ = error$ 
    EndIf 
    
    ProcedureReturn out$  
  EndIf 
  
EndProcedure   

Procedure CompileWithDebug(compiler,code$,bProgress=0) 
  Protected temp$ = GetTemporaryDirectory() 
  Protected source$ = temp$ + "checkcode" 
  
  Protected fn = CreateFile(-1,source$+".pb") 
  If fn 
    WriteString(fn,code$,#PB_UTF8)
    CloseFile(fn) 
    SendCompilerCommand(Compiler, "SOURCE"+Chr(9)+source$+".pb")
    SendCompilerCommand(Compiler, "TARGET"+Chr(9)+source$+".exe")
    SendCompilerCommand(Compiler, "COMPILE"+Chr(9)+"PROGRESS"+Chr(9)+"DEBUGGER")
    
    While out$ <> "SUCCESS" And Left(out$,5)<>"ERROR"
      out$ = GetCompilerOutput(compiler) 
      If out$ <> "" 
        If bProgress
          PrintN(out$) 
                    
        EndIf   
      EndIf   
    Wend
    
    If out$ = "SUCCESS" 
      RunProgram(source$+".exe") 
      RunProgram(source$+".pb") 
    EndIf  
    
  EndIf 
  
EndProcedure   

OpenConsole()
Global code$,result$,compiler = StartCompiler() 
If compiler 
  
  code$ = ~"OpenConsole(\"test\")" + #CRLF$ 
  code$ + ~"PrintN(\"Hello World\")" + #CRLF$ 
  code$ + ~"Inpu()" + #CRLF$  ;error here 
  
  PrintN("Result")
  PrintN(CheckSyntax(compiler,code$,1))  
  
  code$ = ~"OpenConsole(\"test\")" + #CRLF$ 
  code$ + ~"PrintN(\"Hello World\")" + #CRLF$
  code$ + ~"Debug \"Hello\"" + #CRLF$ 
  code$ + ~"Input()" + #CRLF$  
  
  PrintN("Result") 
  PrintN(CheckSyntax(compiler,code$)) 
  CompileWithDebug(compiler,code$,1) 
  Input()
  StopCompiler(compiler) 
EndIf 
Input() 
CloseConsole()  



User avatar
JHPJHP
Addict
Addict
Posts: 2252
Joined: Sat Oct 09, 2010 3:47 am

Re: ChatGPT REST API

Post by JHPJHP »

Hi idle,

That's a smart bit of code, thank you.

Here is a cursory update; place it in the root folder: Ask_ChatGPT_REST_API_SRC

Code: Select all

IncludeFile "includes/sources.pbi"

CompilerIf #PB_Compiler_OS = #PB_OS_Windows
  #Compiler = #PB_Compiler_Home + "compilers\pbcompiler.exe"
CompilerElse
  #Compiler = #PB_Compiler_Home + "compilers/pbcompiler"
CompilerEndIf

Procedure StartCompiler()
  Protected cmd.s, result
  Protected temp$ = GetTemporaryDirectory()

  CompilerIf #PB_Compiler_OS = #PB_OS_Windows
    cmd = "/STANDBY"
  CompilerElse
    cmd = "-sb"
  CompilerEndIf

  result = RunProgram(#Compiler, cmd, temp$, #PB_Program_Open | #PB_Program_Read | #PB_Program_Write | #PB_Program_Hide)
  ProcedureReturn result
EndProcedure

Procedure StopCompiler(compiler)
  Protected cmd.s

  CompilerIf #PB_Compiler_OS = #PB_OS_Windows
    cmd = "END"
  CompilerElse
    cmd = "END"
  CompilerEndIf

  WriteProgramStringN(compiler, cmd)
  WaitProgram(compiler, 5000)
  CloseProgram(compiler)
EndProcedure

Procedure SendCompilerCommand(compiler, command$)
  If ProgramRunning(compiler)
    WriteProgramStringN(compiler, command$)
  EndIf
EndProcedure

Procedure.s GetCompilerOutput(compiler)
  If AvailableProgramOutput(compiler)
    ProcedureReturn ReadProgramString(compiler)
  EndIf
EndProcedure

Procedure WaitCompilerReady(compiler)
  Protected out$

  While out$ <> "READY" And Left(out$, 5) <> "ERROR"
    out$ = GetCompilerOutput(compiler)
  Wend
EndProcedure

Procedure.s CheckSyntax(compiler, code$, bProgress = 0)
  Protected temp$ = GetTemporaryDirectory()
  Protected source$ = temp$ + "checkcode"
  Protected out$, error$
  Protected fn = CreateFile(-1, source$ + ".pb")

  If fn
    WriteString(fn, code$, #PB_UTF8)
    CloseFile(fn)
    SendCompilerCommand(Compiler, "SOURCE" + Chr(9) + source$ + ".pb")
    SendCompilerCommand(Compiler, "TARGET" + Chr(9) + source$ + ".exe")
    SendCompilerCommand(Compiler, "COMPILE" + Chr(9) + "PROGRESS" + Chr(9) + "SYNTAX")

    While out$ <> "SUCCESS" And Left(out$, 5) <> "ERROR"
      out$ = GetCompilerOutput(compiler)

      If out$ <> ""
        If bProgress
          PrintN(out$)
        EndIf
      EndIf
    Wend

    If Left(out$, 5) = "ERROR"
      While out$ <> "OUTPUT" + #TAB$ + "COMPLETE"
        out$ = GetCompilerOutput(compiler)

        If (out$ <> "" And Left(out$, 6) <> "OUTPUT")
          error$ + out$

          If bProgress
            PrintN(out$)
          EndIf
        EndIf
      Wend
      out$ = error$
    EndIf
    ProcedureReturn out$
  EndIf
EndProcedure

Procedure CompileWithDebug(compiler, code$, bProgress = 0)
  Protected temp$ = GetTemporaryDirectory()
  Protected source$ = temp$ + "checkcode"
  Protected fn = CreateFile(-1, source$ + ".pb")

  If fn
    WriteString(fn, code$, #PB_UTF8)
    CloseFile(fn)
    SendCompilerCommand(Compiler, "SOURCE" + Chr(9) + source$ + ".pb")
    SendCompilerCommand(Compiler, "TARGET" + Chr(9) + source$ + ".exe")
    SendCompilerCommand(Compiler, "COMPILE" + Chr(9) + "PROGRESS" + Chr(9) + "DEBUGGER")

    While out$ <> "SUCCESS" And Left(out$, 5) <> "ERROR"
      out$ = GetCompilerOutput(compiler)

      If out$ <> ""
        If bProgress
          PrintN(out$)
        EndIf
      EndIf
    Wend

    If out$ = "SUCCESS"
      RunProgram(source$ + ".exe")
    EndIf
  EndIf
EndProcedure

OpenConsole()
compiler = StartCompiler()

If compiler
  code$ = ~";ChatGPT: Check Code"
  code$ + ~"OpenConsole(\"test\")" + #CRLF$
  code$ + ~"PrintN(\"Hello World\")" + #CRLF$
  code$ + ~"Inpu()"
  return_message$ = CheckSyntax(compiler, code$)

  While return_message$ <> "SUCCESS"
    If pass > 4 Or Not FindString(code$, ";ChatGPT: Check Code")
      MessageRequester("Ask ChatGPT", code$, #PB_MessageRequester_Info)
      Break
    Else
      pass + 1
    EndIf
    chatgpt\UserInstruction = "Here is the error: " + return_message$ +
                              "Fix the following code for the PureBasic compiler. " +
                              "Only return the repaired code, no extra comments. " +
                              "Keep the original formatting: " + code$
    JSON_Response$ = AskChatGPT(@chatgpt)
    code$ = ExtractContent(JSON_Response$)
    return_message$ = CheckSyntax(compiler, code$)
  Wend
  CompileWithDebug(compiler, code$, 1)
  StopCompiler(compiler)
EndIf
Input()
CloseConsole()

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
idle
Always Here
Always Here
Posts: 5840
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: ChatGPT REST API

Post by idle »

JHPJHP wrote: Sun Jun 01, 2025 2:21 am Hi idle,

That's a smart bit of code, thank you.

Here is a cursory update; place it in the root folder: Ask_ChatGPT_REST_API_SRC

Code: Select all

IncludeFile "includes/sources.pbi"

CompilerIf #PB_Compiler_OS = #PB_OS_Windows
  #Compiler = #PB_Compiler_Home + "compilers\pbcompiler.exe"
CompilerElse
  #Compiler = #PB_Compiler_Home + "compilers/pbcompiler"
CompilerEndIf

Procedure StartCompiler()
  Protected cmd.s, result
  Protected temp$ = GetTemporaryDirectory()

  CompilerIf #PB_Compiler_OS = #PB_OS_Windows
    cmd = "/STANDBY"
  CompilerElse
    cmd = "-sb"
  CompilerEndIf

  result = RunProgram(#Compiler, cmd, temp$, #PB_Program_Open | #PB_Program_Read | #PB_Program_Write | #PB_Program_Hide)
  ProcedureReturn result
EndProcedure

Procedure StopCompiler(compiler)
  Protected cmd.s

  CompilerIf #PB_Compiler_OS = #PB_OS_Windows
    cmd = "END"
  CompilerElse
    cmd = "END"
  CompilerEndIf

  WriteProgramStringN(compiler, cmd)
  WaitProgram(compiler, 5000)
  CloseProgram(compiler)
EndProcedure

Procedure SendCompilerCommand(compiler, command$)
  If ProgramRunning(compiler)
    WriteProgramStringN(compiler, command$)
  EndIf
EndProcedure

Procedure.s GetCompilerOutput(compiler)
  If AvailableProgramOutput(compiler)
    ProcedureReturn ReadProgramString(compiler)
  EndIf
EndProcedure

Procedure WaitCompilerReady(compiler)
  Protected out$

  While out$ <> "READY" And Left(out$, 5) <> "ERROR"
    out$ = GetCompilerOutput(compiler)
  Wend
EndProcedure

Procedure.s CheckSyntax(compiler, code$, bProgress = 0)
  Protected temp$ = GetTemporaryDirectory()
  Protected source$ = temp$ + "checkcode"
  Protected out$, error$
  Protected fn = CreateFile(-1, source$ + ".pb")

  If fn
    WriteString(fn, code$, #PB_UTF8)
    CloseFile(fn)
    SendCompilerCommand(Compiler, "SOURCE" + Chr(9) + source$ + ".pb")
    SendCompilerCommand(Compiler, "TARGET" + Chr(9) + source$ + ".exe")
    SendCompilerCommand(Compiler, "COMPILE" + Chr(9) + "PROGRESS" + Chr(9) + "SYNTAX")

    While out$ <> "SUCCESS" And Left(out$, 5) <> "ERROR"
      out$ = GetCompilerOutput(compiler)

      If out$ <> ""
        If bProgress
          PrintN(out$)
        EndIf
      EndIf
    Wend

    If Left(out$, 5) = "ERROR"
      While out$ <> "OUTPUT" + #TAB$ + "COMPLETE"
        out$ = GetCompilerOutput(compiler)

        If (out$ <> "" And Left(out$, 6) <> "OUTPUT")
          error$ + out$

          If bProgress
            PrintN(out$)
          EndIf
        EndIf
      Wend
      out$ = error$
    EndIf
    ProcedureReturn out$
  EndIf
EndProcedure

Procedure CompileWithDebug(compiler, code$, bProgress = 0)
  Protected temp$ = GetTemporaryDirectory()
  Protected source$ = temp$ + "checkcode"
  Protected fn = CreateFile(-1, source$ + ".pb")

  If fn
    WriteString(fn, code$, #PB_UTF8)
    CloseFile(fn)
    SendCompilerCommand(Compiler, "SOURCE" + Chr(9) + source$ + ".pb")
    SendCompilerCommand(Compiler, "TARGET" + Chr(9) + source$ + ".exe")
    SendCompilerCommand(Compiler, "COMPILE" + Chr(9) + "PROGRESS" + Chr(9) + "DEBUGGER")

    While out$ <> "SUCCESS" And Left(out$, 5) <> "ERROR"
      out$ = GetCompilerOutput(compiler)

      If out$ <> ""
        If bProgress
          PrintN(out$)
        EndIf
      EndIf
    Wend

    If out$ = "SUCCESS"
      RunProgram(source$ + ".exe")
    EndIf
  EndIf
EndProcedure

OpenConsole()
compiler = StartCompiler()

If compiler
  code$ = ~";ChatGPT: Check Code"
  code$ + ~"OpenConsole(\"test\")" + #CRLF$
  code$ + ~"PrintN(\"Hello World\")" + #CRLF$
  code$ + ~"Inpu()"
  return_message$ = CheckSyntax(compiler, code$)

  While return_message$ <> "SUCCESS"
    If pass > 4 Or Not FindString(code$, ";ChatGPT: Check Code")
      MessageRequester("Ask ChatGPT", code$, #PB_MessageRequester_Info)
      Break
    Else
      pass + 1
    EndIf
    chatgpt\UserInstruction = "Here is the error: " + return_message$ +
                              "Fix the following code for the PureBasic compiler. " +
                              "Only return the repaired code, no extra comments. " +
                              "Keep the original formatting: " + code$
    JSON_Response$ = AskChatGPT(@chatgpt)
    code$ = ExtractContent(JSON_Response$)
    return_message$ = CheckSyntax(compiler, code$)
  Wend
  CompileWithDebug(compiler, code$, 1)
  StopCompiler(compiler)
EndIf
Input()
CloseConsole()
That's pretty neat. :mrgreen:
I had to head out for the day and didn't have time to integrating it, so thanks.
It could also be used to debug code using the onerror lib for instance, so if it crashes it reports the line the error occurred then tries to fix it.
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: ChatGPT REST API

Post by Caronte3D »

Very interesting! :shock:
User avatar
JHPJHP
Addict
Addict
Posts: 2252
Joined: Sat Oct 09, 2010 3:47 am

Re: ChatGPT REST API

Post by JHPJHP »

Hi Caronte3D,

Thank you for your post.

This is the original web interface (PWA) I created to become familiar with the OpenAI API. It was a personal project, the only platforms tested were Windows 10/11 and the latest iPhones.

Information:
1. The Garbage button deletes the selected Instruction from the dropdown and database.
2. The Layer button toggles between conversation mode and instruction mode.
• In instruction mode new instructions are save to the database, added to the dropdown.
3. The Paperclip button attaches a user-defined text file or image file to the request.
• When a file is attached a quick click hides the file; hold the button to delete.
4. The Clipboard button pastes text or an image to the request.
• When the text or image is pasted to the clipboard, a quick click hides the data; hold the button to delete.
• The Instruction text box can also be used to paste (over-sized) text or an image.
5. The Switch button toggles active either the Context or Instruction text boxes.
6. The Microphone button translates speech to text to whichever text box is active.

The Narrate button reads back the returned response highlighting each word as it's read.

NB*: Pressing the Submit button creates a cookie of saved parameters, the Reset button deletes the cookie.

Image
Last edited by JHPJHP on Sun Jun 15, 2025 3:16 pm, edited 3 times in total.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: ChatGPT REST API

Post by Caronte3D »

Good work, nice interface also! :wink:
User avatar
JHPJHP
Addict
Addict
Posts: 2252
Joined: Sat Oct 09, 2010 3:47 am

Re: ChatGPT REST API

Post by JHPJHP »

Hi Caronte3D,

Thank you again for taking the time to post.

--------------------------

Applied small update to API.
• Fixed JSON syntax for Conversations, was missing square brackets.
• Added conditional argument to Logit Bias POST request.

Interesting:
There have been 120 requests made to the API since posting this thread, the cost has been $0.05.

Note: Cost is attributed to token count not the number of requests; the larger the request/response the more tokens used.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
idle
Always Here
Always Here
Posts: 5840
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: ChatGPT REST API

Post by idle »

It's unfortunately a common occurrence these days, lots of people take a look but very few take the time to say anything. I don't know what that's about, brains numbed by social media and instant messaging?
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: ChatGPT REST API

Post by Demivec »

idle wrote: Sun Jun 01, 2025 11:38 pm It's unfortunately a common occurrence these days, lots of people take a look but very few take the time to say anything. I don't know what that's about, brains numbed by social media and instant messaging?
Speaking for myself, forum threads are hard to follow with lots of side responses that all say the same thing or worse, diverge onto random tangents or nonsense. I know that even though JHPJHP knows he is skillful and he generously shares many codes he also appreciates acknowledgement of this. I just wish there was a better way to express all that without bogging down the thread where those things are being shared. Thanks for all you share JHPJHP and thanks to others as well. It is what makes this forum a community.

A view is added each time someone looks at a thread. Add another round of views each time a new post is added. If posts were added each time a person viewed a thread it wouldn't be possible for anyone to ever catch up with even reading the posts (kinda line a wayward event loop). :) I think 'views' is just a processing statistic and should be taken with a grain of salt.
User avatar
JHPJHP
Addict
Addict
Posts: 2252
Joined: Sat Oct 09, 2010 3:47 am

Re: ChatGPT REST API

Post by JHPJHP »

Hi idle, Demivec,

First, let me say that I agree with both of you. While there is little acknowledgement, threads become hard to follow when nonsense is posted.

Personally, I appreciate posts that open up a programming dialog like the compiler script written by idle.

I'm not sure if it was the following quote that started this discussion:
JHPJHP wrote:There have been 120 requests made to the API since posting this thread, the cost has been $0.05.
My intention in posting this information was to show how cheap the API is to use.

Either using my REST API or PWA the community has made 120 POST requests and only $0.05 was spent.
Last edited by JHPJHP on Sun Jun 15, 2025 2:50 pm, edited 2 times in total.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
idle
Always Here
Always Here
Posts: 5840
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: ChatGPT REST API

Post by idle »

Yes I prefer to contribute to a thread with something useful to the topic but I also like to see acknowledgement and thanks for peoples efforts.

If you don't mind me burning through a bit of the credit I can expand the compiler driver to debug and eventually turn it into a compiler tool so we can interactively use it to debug and generate code in the IDE.
User avatar
JHPJHP
Addict
Addict
Posts: 2252
Joined: Sat Oct 09, 2010 3:47 am

Re: ChatGPT REST API

Post by JHPJHP »

Hi idle,

Burn away :)

Hopefully it will inspire more contributions.

If anyone is worried about access disappearing...

Creating your own Procedures using the online API is simple; see the following thread by ricardo: viewtopic.php?t=81312.
Last edited by JHPJHP on Sun Jun 15, 2025 2:51 pm, edited 2 times in total.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
tj1010
Enthusiast
Enthusiast
Posts: 716
Joined: Mon Feb 25, 2013 5:51 pm

Re: ChatGPT REST API

Post by tj1010 »

You can also do this with Ollama server and OpenAI-REST and DeepSeek R1 and pay nothing for unlimited use of full model features.. In fact you can do it with every model Ollama supports; which is basically every open model in existence..

A lot of people cheat at image generation in mobile apps by calling llama 3.2 vision like this. I do it with DeepSeek R1 in a personal finance app for Android to analyze statement CSV and give users investment strategies..

By the way Opus 4, DeepSeek-R1-0528, Grok3, Gemini 2.5 Pro, Amazon Q(all top-scoring models) SWE-Bench scores only deviate about 20% a year until a plateau. OpenAI has been gaining around 18% a year since 2022 on their non-reasoning models with SWE-Bench.. GPT 4.1 is currently plateaued at 42% on SWE Bench Verified; which means it's wrong with coding over half the time, at least.. Gee, if only there were a way to track AI progress for people who are convinced they know about the subject and/or science XD
Tawbie
User
User
Posts: 35
Joined: Fri Jul 10, 2020 2:36 am
Location: Australia

Re: ChatGPT REST API

Post by Tawbie »

@JHPJHP
In line with Demivec's comments, I read the forum fairly regularly but I do not post unless I have something of value to add (you can tell from how few times I've posted). However, I do realise that feedback and acknowledgement are important in providing encouragement and kudos to the author. Accordingly, let me take this opportunity to congratulate you on all your posts and contributions to the forum which have always been of the highest calibre.
Post Reply