B4A Class B4X - OpenAI - a class to work with OpenAI in your B4X-Project

This clas is based on the work of @Abdull Cadre and @JackKirk.

I got addicted and played a bit with OpenAI and added some Methods from the Api. ?
I also added the functionality in my Discord-Bot in my racing-league.

I would like to share the actual class here and also i try to give some help in implementing this Class.


Note that i developed the Class using B4J and use Windows-Path for the downloadfolder. change them to Androidspecific folders like File.DirInternal.

ATTENTION: Please note that OpenAI is not a free service if you want to use the Api, want to use your own Assistants.

Add a Environmentvariable OpenAItoken containing your ApiKey to your system. The ApiKey is read from Environment when Initializing the Class

Add the class to your project and Initialize it
B4X:
    Public AI As OpenAI
    AI.Initialize("org-Ucp") ' Set your OrganisationID here
    AI.Assistant = "asst_TQ..." ' Set your AssistantID here if you want to use the Assistant-API
    AI.Logfilepath = "C:\ORCBot\logs\OpenAI" ' Set logfilepath to a working path for logfiles. Set it to "" to disable logging


Class Methods:
- CreateAssistant
- CreateAssistantFile
- ModifyAssistant
- ListAssistants
- ListAssistantFiles
- UploadFile
- RetrieveMessage

- ChatCompletion
- CreateThread
- CreateRun
- RetrieveRun
- ListRunSteps
- CreateThreadAndRun

- createTranscription
- createSpeech

- QueryImage
 

Attachments

  • OpenAI.bas
    34.3 KB · Views: 190
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Working with Assistants

To work with Assistants you have to fulfill some requirements.
- A Assistant can only work in a "Thread". So if you want to start parsing the input and run a (or some) Assistant you have to
1. Upload files which can be used in Assistants to your Assistant. Remember the fileID.
2. Create a new Thread
3. Add all relevant Messages to this thread
4. Create a run for this Thread and
5. wait for finishing the run.

The File i uploaded to my assistant is a JSONL-File. Means there are one Dataset in each LINE. The Data is JSON.
Note the first line which is the headerline. I gave my assistant the INSTRUCTION
"Du bist ein höflicher Assistent. Wenn Du eine Frage gestellt bekommst lieferst du den Wert aus Content vom Eintrag aus den Dateien mit der höchsten Relevanz im feld Kategorie zurück."
in english something like
"You are a kind Assistant. When you get asked a question you deliver the first value from Content from the entries in the Files with the highest relevance in the field Kategory back."

So the assistant with look at this file and get the most relevant KAPITEL and deliver the Value from Content in this Dataset.

["Kapitel", "Content"]
["Master", "Es ist doch wohl klar, dass ORC_DonManfred unser Gott der Bots ist. **ODER?**"]
["Mr MIMIMI", "Es ist hinlänglich bekannt, dass ORC_MIKE unser Mr. MI MI MI ist."]
The Method CreateThreadAndRun is a simple but complete Example of doing all these steps in just one.


B4X:
Public Sub CreateThreadAndRun(assistant_id As String, query_string As String, fileids As List) As ResumableSub
 
    'For complete documentation you should look at:
    'https://platform.openai.com/docs/api-reference/runs/createThreadAndRun
 
    Try
 
        ' Consider using 'gpt-4-turbo-preview', 'gpt-3.5-turbo', or a later model.",
        Dim model As String = "'gpt-3.5-turbo"
        Dim msgs As List
        msgs.Initialize
        'fileids
        Dim usermap As Map = CreateMap("role":"user","content":query_string)
        If fileids.IsInitialized And fileids.Size>0 Then
            usermap.Put("file_ids",fileids)
        End If
        msgs.Add(usermap)
        Dim thread As Map
        thread.Initialize
        thread.Put("messages",msgs)
      
        Dim m As Map = CreateMap("model":model,"assistant_id": assistant_id, "thread":thread)
        m.Put("stream",True)

        Dim jgen As JSONGenerator
        jgen.Initialize(m)
 

        'Uncomment this line if you want to see raw input string
        Log(jgen.ToString)

 
        Dim response As String
 
        Dim req As HttpJob
        req.Initialize("", Me)
        req.PostString("https://api.openai.com/v1/threads/runs", jgen.ToString)
        req.GetRequest.SetHeader("Authorization", "Bearer "&mtoken)
        'And if you have an organisation key...
        'If your account default organisation is "Personal" then you can supply
        'a blank organisation key - or just comment this line out
        'req.GetRequest.SetHeader("OpenAI-Organization", "org-xxx")
        req.GetRequest.SetHeader("OpenAI-Organization", morganization)
        req.GetRequest.SetHeader("OpenAI-Beta", "assistants=v1")
        req.GetRequest.SetContentType("application/json")
 
        Wait For (req) JobDone(req As HttpJob)
 
        If req.Success Then
    
            'Uncomment this line if you want to see raw JSON response
            Dim res As String = req.GetString
            'Log(res)
            response = res
            If mlogfilepath<> "" Then
                File.WriteString(mlogfilepath,$"Assistant-run-${DateTime.Now}.txt"$,res)
            End If

            'response = ParseJson(req.GetString)
 
        Else
    
            response = "ERROR: " & req.ErrorMessage
 
        End If
 
        req.Release
 
    Catch
 
        response = "ERROR: " & LastException
 
    End Try
 
    Return response

End Sub

Example of call
B4X:
    Dim fileids As List
    fileids.Initialize
    fileids.Add("file_xx...") ' add the fileID you want to use in this run in a per run basis.
   
    Wait For (AI.CreateThreadAndRun(AI.Assistant,"Was steht im Regelwerk zu Lackierungen?",fileids)) Complete (response As String)
    Log(response)

It will result in the following output


Token set from Environment. -> sk-xhvYz2N[..]
*** mainpage: B4XPage_Created
*** mainpage: B4XPage_Appear
*** mainpage: B4XPage_Resize [mainpage]
CreateThreadAndRun(asst_TQdhpQHjZAmzjrUu38vBH3eV, Was steht im Regelwerk zu Lackierungen?, [file-xCdISUc8roRCJcXhmPdRBe1d])
{"assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","stream":true,"thread":{"messages":[{"role":"user","file_ids":["file-xCdISUc8roRCJcXhmPdRBe1d"],"content":"Was steht im Regelwerk zu Lackierungen?"}]}}
event: thread.created
data: {"id":"thread_yExzvzhgNVfPwsCWrVKyZynd","object":"thread","created_at":1712044932,"metadata":{}}
event: thread.run.created
data: {"id":"run_Ls6989ynRWUOFT168wsznwwM","object":"thread.run","created_at":1712044932,"assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","status":"queued","started_at":null,"expires_at":1712045532,"cancelled_at":null,"failed_at":null,"completed_at":null,"required_action":null,"last_error":null,"model":"gpt-3.5-turbo","instructions":"Du bist ein höflicher Assistent. Wenn Du eine Frage gestellt bekommst lieferst du den Wert aus Content vom Eintrag aus den Dateien mit der höchsten Relevanz im feld Kategorie zurück.","tools":[{"type":"retrieval"}],"file_ids":["file-f0Ed8f3nHCT3DPbyfJ6zioN6","file-PjlnXxoNEdCbSFNdeZZEJhHH","file-xCdISUc8roRCJcXhmPdRBe1d"],"metadata":{},"temperature":1.0,"usage":null}
event: thread.run.queued
data: {"id":"run_Ls6989ynRWUOFT168wsznwwM","object":"thread.run","created_at":1712044932,"assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","status":"queued","started_at":null,"expires_at":1712045532,"cancelled_at":null,"failed_at":null,"completed_at":null,"required_action":null,"last_error":null,"model":"gpt-3.5-turbo","instructions":"Du bist ein höflicher Assistent. Wenn Du eine Frage gestellt bekommst lieferst du den Wert aus Content vom Eintrag aus den Dateien mit der höchsten Relevanz im feld Kategorie zurück.","tools":[{"type":"retrieval"}],"file_ids":["file-f0Ed8f3nHCT3DPbyfJ6zioN6","file-PjlnXxoNEdCbSFNdeZZEJhHH","file-xCdISUc8roRCJcXhmPdRBe1d"],"metadata":{},"temperature":1.0,"usage":null}
event: thread.run.in_progress
data: {"id":"run_Ls6989ynRWUOFT168wsznwwM","object":"thread.run","created_at":1712044932,"assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","status":"in_progress","started_at":1712044933,"expires_at":1712045532,"cancelled_at":null,"failed_at":null,"completed_at":null,"required_action":null,"last_error":null,"model":"gpt-3.5-turbo","instructions":"Du bist ein höflicher Assistent. Wenn Du eine Frage gestellt bekommst lieferst du den Wert aus Content vom Eintrag aus den Dateien mit der höchsten Relevanz im feld Kategorie zurück.","tools":[{"type":"retrieval"}],"file_ids":["file-f0Ed8f3nHCT3DPbyfJ6zioN6","file-PjlnXxoNEdCbSFNdeZZEJhHH","file-xCdISUc8roRCJcXhmPdRBe1d"],"metadata":{},"temperature":1.0,"usage":null}
event: thread.run.step.created
data: {"id":"step_5tvS5xgOtGtNjTJ3N1b4sDIx","object":"thread.run.step","created_at":1712044935,"run_id":"run_Ls6989ynRWUOFT168wsznwwM","assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","type":"tool_calls","status":"in_progress","cancelled_at":null,"completed_at":null,"expires_at":1712045532,"failed_at":null,"last_error":null,"step_details":{"type":"tool_calls","tool_calls":[]},"usage":null}
event: thread.run.step.in_progress
data: {"id":"step_5tvS5xgOtGtNjTJ3N1b4sDIx","object":"thread.run.step","created_at":1712044935,"run_id":"run_Ls6989ynRWUOFT168wsznwwM","assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","type":"tool_calls","status":"in_progress","cancelled_at":null,"completed_at":null,"expires_at":1712045532,"failed_at":null,"last_error":null,"step_details":{"type":"tool_calls","tool_calls":[]},"usage":null}
event: thread.run.step.delta
data: {"id":"step_5tvS5xgOtGtNjTJ3N1b4sDIx","object":"thread.run.step.delta","delta":{"step_details":{"type":"tool_calls","tool_calls":[{"index":0,"id":"call_yIyW9jlgtViMGmKfPVqr3lAH","type":"retrieval","retrieval":{}}]}}}
event: thread.run.step.completed
data: {"id":"step_5tvS5xgOtGtNjTJ3N1b4sDIx","object":"thread.run.step","created_at":1712044935,"run_id":"run_Ls6989ynRWUOFT168wsznwwM","assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","type":"tool_calls","status":"completed","cancelled_at":null,"completed_at":1712044937,"expires_at":1712045532,"failed_at":null,"last_error":null,"step_details":{"type":"tool_calls","tool_calls":[{"id":"call_yIyW9jlgtViMGmKfPVqr3lAH","type":"retrieval","retrieval":{}}]},"usage":{"prompt_tokens":748,"completion_tokens":30,"total_tokens":778}}
event: thread.run.step.created
data: {"id":"step_secgfHvMCsNavRI7Hjl2Dm6h","object":"thread.run.step","created_at":1712044937,"run_id":"run_Ls6989ynRWUOFT168wsznwwM","assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","type":"message_creation","status":"in_progress","cancelled_at":null,"completed_at":null,"expires_at":1712045532,"failed_at":null,"last_error":null,"step_details":{"type":"message_creation","message_creation":{"message_id":"msg_At64gEv6AzMbSo0hEnuf2lGc"}},"usage":null}
event: thread.run.step.in_progress
data: {"id":"step_secgfHvMCsNavRI7Hjl2Dm6h","object":"thread.run.step","created_at":1712044937,"run_id":"run_Ls6989ynRWUOFT168wsznwwM","assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","type":"message_creation","status":"in_progress","cancelled_at":null,"completed_at":null,"expires_at":1712045532,"failed_at":null,"last_error":null,"step_details":{"type":"message_creation","message_creation":{"message_id":"msg_At64gEv6AzMbSo0hEnuf2lGc"}},"usage":null}
event: thread.message.created
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message","created_at":1712044937,"assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","run_id":"run_Ls6989ynRWUOFT168wsznwwM","status":"in_progress","incomplete_details":null,"incomplete_at":null,"completed_at":null,"role":"assistant","content":[],"file_ids":[],"metadata":{}}
event: thread.message.in_progress
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message","created_at":1712044937,"assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","run_id":"run_Ls6989ynRWUOFT168wsznwwM","status":"in_progress","incomplete_details":null,"incomplete_at":null,"completed_at":null,"role":"assistant","content":[],"file_ids":[],"metadata":{}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"Im","annotations":[]}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Regel"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"werk"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" bez"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ü"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"glich"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Lack"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ier"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ungen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" wird"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Fol"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"gend"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"es"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" fest"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ge"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"halten"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":":\n\n"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"-"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Lack"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ier"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ungen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" sind"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" nicht"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" expl"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"iz"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"it"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" als"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" eigen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ständ"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"iger"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Abs"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"chnitt"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" auf"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ge"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"führt"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":".\n"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"-"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Es"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" wird"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" jedoch"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" erw"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"äh"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"nt"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":","}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" dass"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" in"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" den"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" R"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ennen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" der"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Pro"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"L"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"igen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Punk"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"te"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" ver"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"geben"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" werden"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" bas"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ier"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"end"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" auf"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" den"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Platz"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ier"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ungen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" und"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" auch"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" für"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" die"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" schnell"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ste"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" R"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"enn"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"r"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"unde"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":".\n"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"-"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Es"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" gibt"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Reg"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"eln"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" für"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" die"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Lobby"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"-E"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"inst"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ellungen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":","}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Ren"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"nd"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"istan"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"z"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":","}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Fahr"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ze"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"uge"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":","}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Lobby"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"e"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"inst"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ellungen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":","}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Ren"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ne"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"inst"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ellungen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":","}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Reg"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"lement"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"e"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"inst"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ellungen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":","}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Punk"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"tes"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ystem"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":","}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Fahr"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"er"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"feld"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" und"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" weitere"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" As"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"pe"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"kte"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" des"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" R"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"enn"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ens"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":","}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" aber"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" keine"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" spe"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"z"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"if"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ischen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Reg"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"eln"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" nur"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" für"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":" Lack"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ier"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"ungen"}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"【11†source】","annotations":[{"type":"file_citation","text":"【11†source】","start_index":536,"end_index":547,"file_citation":{"file_id":"file-xCdISUc8roRCJcXhmPdRBe1d","quote":""}}]}}]}}
event: thread.message.delta
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message.delta","delta":{"content":[{"index":0,"type":"text","text":{"value":"."}}]}}
event: thread.message.completed
data: {"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message","created_at":1712044937,"assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","run_id":"run_Ls6989ynRWUOFT168wsznwwM","status":"completed","incomplete_details":null,"incomplete_at":null,"completed_at":1712044939,"role":"assistant","content":[{"type":"text","text":{"value":"Im Regelwerk bezüglich Lackierungen wird Folgendes festgehalten:\n\n- Lackierungen sind nicht explizit als eigenständiger Abschnitt aufgeführt.\n- Es wird jedoch erwähnt, dass in den Rennen der ProLigen Punkte vergeben werden basierend auf den Platzierungen und auch für die schnellste Rennrunde.\n- Es gibt Regeln für die Lobby-Einstellungen, Renndistanz, Fahrzeuge, Lobbyeinstellungen, Renneinstellungen, Reglementeinstellungen, Punktesystem, Fahrerfeld und weitere Aspekte des Rennens, aber keine spezifischen Regeln nur für Lackierungen【11†source】.","annotations":[{"type":"file_citation","text":"【11†source】","start_index":536,"end_index":547,"file_citation":{"file_id":"file-xCdISUc8roRCJcXhmPdRBe1d","quote":""}}]}}],"file_ids":[],"metadata":{}}
event: thread.run.step.completed
data: {"id":"step_secgfHvMCsNavRI7Hjl2Dm6h","object":"thread.run.step","created_at":1712044937,"run_id":"run_Ls6989ynRWUOFT168wsznwwM","assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","type":"message_creation","status":"completed","cancelled_at":null,"completed_at":1712044939,"expires_at":1712045532,"failed_at":null,"last_error":null,"step_details":{"type":"message_creation","message_creation":{"message_id":"msg_At64gEv6AzMbSo0hEnuf2lGc"}},"usage":{"prompt_tokens":2878,"completion_tokens":152,"total_tokens":3030}}
event: thread.run.completed
data: {"id":"run_Ls6989ynRWUOFT168wsznwwM","object":"thread.run","created_at":1712044932,"assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","status":"completed","started_at":1712044933,"expires_at":null,"cancelled_at":null,"failed_at":null,"completed_at":1712044939,"required_action":null,"last_error":null,"model":"gpt-3.5-turbo","instructions":"Du bist ein höflicher Assistent. Wenn Du eine Frage gestellt bekommst lieferst du den Wert aus Content vom Eintrag aus den Dateien mit der höchsten Relevanz im feld Kategorie zurück.","tools":[{"type":"retrieval"}],"file_ids":["file-f0Ed8f3nHCT3DPbyfJ6zioN6","file-PjlnXxoNEdCbSFNdeZZEJhHH","file-xCdISUc8roRCJcXhmPdRBe1d"],"metadata":{},"temperature":1.0,"usage":{"prompt_tokens":3626,"completion_tokens":182,"total_tokens":3808}}
event: done
data: [DONE]

The line event: thread.message.completed and the followiing line is the important one.
{"id":"msg_At64gEv6AzMbSo0hEnuf2lGc","object":"thread.message","created_at":1712044937,"assistant_id":"asst_TQdhpQHjZAmzjrUu38vBH3eV","thread_id":"thread_yExzvzhgNVfPwsCWrVKyZynd","run_id":"run_Ls6989ynRWUOFT168wsznwwM","status":"completed","incomplete_details":null,"incomplete_at":null,"completed_at":1712044939,"role":"assistant","content":[{"type":"text","text":{"value":"Im Regelwerk bezüglich Lackierungen wird Folgendes festgehalten:\n\n- Lackierungen sind nicht explizit als eigenständiger Abschnitt aufgeführt.\n- Es wird jedoch erwähnt, dass in den Rennen der ProLigen Punkte vergeben werden basierend auf den Platzierungen und auch für die schnellste Rennrunde.\n- Es gibt Regeln für die Lobby-Einstellungen, Renndistanz, Fahrzeuge, Lobbyeinstellungen, Renneinstellungen, Reglementeinstellungen, Punktesystem, Fahrerfeld und weitere Aspekte des Rennens, aber keine spezifischen Regeln nur für Lackierungen【11†source】.","annotations":[{"type":"file_citation","text":"【11†source】","start_index":536,"end_index":547,"file_citation":{"file_id":"file-xCdISUc8roRCJcXhmPdRBe1d","quote":""}}]}}],"file_ids":[],"metadata":{}}
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Hi @DonManfred does anything prevent to use this with B4J?
no
Note that i developed the Class using B4J and use Windows-Path for the downloadfolder. change them to Androidspecific folders like File.DirInternal.

It should work in B4i as well.
 
Last edited:
Top