Skip to content

Whre the hell is the source code when debugging ?Β #5

@SkybuckFlying

Description

@SkybuckFlying

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions