Skip to content

Add generative AI examples and register SplashKit author#759

Open
222448082Ashen wants to merge 1 commit into
thoth-tech:mainfrom
222448082Ashen:usageExamples/generative_ai
Open

Add generative AI examples and register SplashKit author#759
222448082Ashen wants to merge 1 commit into
thoth-tech:mainfrom
222448082Ashen:usageExamples/generative_ai

Conversation

@222448082Ashen
Copy link
Copy Markdown

@222448082Ashen 222448082Ashen commented May 6, 2026

Description

Splashkit Function: generate_reply

Overview of example functionality:
This PR adds an integrated usage example called Interactive AI Terminal (Single-Turn AI). The example opens a window, reads a user prompt using read_line, generates a single AI-style response using generate_reply, and displays the response in terminal and on-screen text.
For environments where the Python binding does not expose generate_reply, the Python variant now falls back to a local reply so the example still runs.

Example Output:
Added screenshot asset at generate_reply-1-example.png

Files Included

  • C++ code
  • C# code (Top-Level statements)
  • C# code (Object-Oriented Programming)
  • Python code
  • Relevant title for the example (.txt)
  • Screenshot

Usage Example Checks (READ CAREFULLY)

  • Code uses Splashkit function above
  • Code does not use non-Splashkit functions
  • Code does not use extra function declarations or extra classes
  • Code does not violate any of the Thoth Tech SplashKit Style Guide rules
  • Simple, clear demonstration of the function
  • Tested in Chrome and Firefox

Add multiple generative AI usage examples and supporting assets under public/usage-examples/generative_ai: C# (OOP and top-level), C++, Python, a PNG screenshot, and a text snippet demonstrating a single-turn "Interactive AI Terminal" using GenerateReply. Also update astro.config.mjs to register a new site author 'sk' (SplashKit) with name, title, URL, and image_url for site metadata.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

Deploy Preview for splashkit failed.

Name Link
🔨 Latest commit 95e684b
🔍 Latest deploy log https://app.netlify.com/projects/splashkit/deploys/69fba596e411730008eb2dc3

Copy link
Copy Markdown

@RUNQILIU-123 RUNQILIU-123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The PR adds a clear and focused generate_reply usage example across C++, C#, and Python, and the example demonstrates the function in a simple single-turn interactive AI terminal format.

The code is easy to follow, uses SplashKit functions appropriately, and includes the supporting title text and screenshot asset. The author metadata update in astro.config.mjs also looks reasonable for registering the SplashKit author.

No blocking issues from my review. Approved.

Copy link
Copy Markdown

@jankiluitel jankiluitel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the PR and the implementation looks solid overall. The generative AI examples are consistent across C#, C++, and Python, and the UI demonstration is easy to follow. The SplashKit author registration in astro.config.mjs is also correctly added and improves configuration consistency.

One minor optional suggestion: the C++ example uses string without explicitly including <string> or using std::string, which may cause issues in some compiler environments.

Apart from that, everything looks good — approved for merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants