docs: Add sample code - #91
Draft
mwien wants to merge 5 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
The following additions are planned:
Open things/questions up for discussion:
sample_codepackage 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.pyrightconfig.jsonto the sample code repo for Pyright to find thebase,coreandgenpackages. Maybe there are better solutions.OrchestrationServiceclient is created for each orchestration request. How should the correct cleanup look like (for example with regard to theclose_http_connectionmethod, which only closes the sync client)?