-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Another issue:
Can't debug the SmartCoreAI components.
Delphi 13 IDE cannot find the source code.
It was installed via GetIt package manager... perhaps... ??????? or it came with, can't remember clearly, can't tell, sucks too.
(Apperently it's under: C:\Tools\RAD Studio\37.0\source\smartcoreai )
Hard to find the code...
Find declaration not working.
Step into code not working.
IDE complains and wants to know where is the code/source files ?! BIZAR.
DCUs enabled, was default off, bizar as well.
Final conclusion of AI:
The bottom line: SmartCoreAI internally uses Delphi's TTask/ThreadPool for async HTTP operations. When we create multiple threads and free components, the library's internal async operations cause access violations. Even with SynchronizeEvents=True and protective delays, the library isn't designed for multi-threaded usage from external code.
Maybe re-naming the project caused this boolean to not be set properly, testing again:
Key fix: SynchronizeEvents := True forces all SmartCoreAI operations to complete synchronously within each thread, preventing the internal async thread pool from creating competing async operations that would cause access violations when components are freed.
^ This did not fix it, AI is struggling with it...
Doing only 10 models at a time seemed to have helped... weird..
More problems according to AI:
π EXCELLENT NEWS! The direct REST API test succeeded!
Key findings:
β
Your API key works perfectly - Got HTTP 200 OK
β
The Gemini API endpoint is correct - v1beta/models/gemini-2.0-flash:generateContent
β
The request format is correct - Proper JSON structure with contents array
β
The model responds - "Hi there!"
This proves:
β The problem is NOT with your API keys
β The problem is NOT with the Gemini API
β
The problem IS with how SmartCoreAI library constructs the request
The SmartCoreAI library is likely:
Using the wrong URL format
Not sending the proper JSON body structure
Not setting the correct Content-Type header
Would you like me to:
Fix the SmartCoreAI library to use the correct request format?
OR create a custom Gemini wrapper that bypasses SmartCoreAI entirely?
The direct test proves your keys and the API are fine - we just need to fix how the requests are being made!
LOL, By-Passing SmartCoreAI and having the AI generate REST API Wrapper directly does work !
More non-working crap from embarcadero as usuals ! SUCKS BALLS.
WTF Now Delphi 64 bit IDE/Debugger refuses to run the exe... bizar... sigh. Plus it greys out sometimes... the run button, but this is even worse... I guess anti gravity locked something inside windows not sure... what a mess.