Skip to content

docs: Add sample code - #91

Draft
mwien wants to merge 5 commits into
mainfrom
add-sample-code
Draft

docs: Add sample code#91
mwien wants to merge 5 commits into
mainfrom
add-sample-code

Conversation

@mwien

@mwien mwien commented Aug 25, 2026

Copy link
Copy Markdown

This PR adds example code that showcases usage of the SDK by exposing HTTP endpoints via a FastAPI application. Similar sample code exists for the other two AI SDKs.

This is a draft PR. The architecture/integration of the sample code may be up to discussion and more features should be added.

Currently, examples are included for the following services:

  • configurations/deployments via the core package
  • native clients (OpenAI/Google/Amazon)
  • orchestration

The following additions are planned:

  • LangChain
  • Grounding
  • Prompt Registry
  • RPT Models

Open things/questions up for discussion:

  • Should the sample_code package be part of the root workspace? This is how it is currently proposed. It would be useful for using it for end-to-end smoke tests.
  • I had to add a pyrightconfig.json to the sample code repo for Pyright to find the base, core and gen packages. Maybe there are better solutions.
  • Currently, each example is completely self-contained (to make it easy to understand and try out for beginners). However, therefore a new OrchestrationService client is created for each orchestration request. How should the correct cleanup look like (for example with regard to the close_http_connection method, which only closes the sync client)?
  • There are some minor type errors from the type checker that one could look into.

@mwien
mwien requested a review from ZhongpinWang August 25, 2026 13:48
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.

1 participant