feat: create more sample code - #150
Conversation
There was a problem hiding this comment.
@OscarDDD Thanks for the sample codes! Just for my own understanding:
[q] I would like to know whether there is a correct, efficient way to verify whether the sample code works (without trying out visually). Would unit tests be a feasible option to test the behavior of all these code snippets?
Another question is:
[q] Do you think from a security vs. usability perspective it is feasible to have setup - cleanup functions (directly as decorators etc.) which deploy (& later teardown) the required models? The logic could look something like:
If the deployment already exists: Reuse the available deployment and don't teardown later.
If the deployment doesn't exist: Create a temporary deployment for the sample, then teardown after running the sample.
mwien
left a comment
There was a problem hiding this comment.
Looks good! Just a few small comments
Re testing:
Re decorators: |
Regarding the unit tests: Regarding the decorators: |
Context
Closes SAP/ai-sdk-python-backlog#27.
What this PR does and why it is needed
Adds sample code for document_grounding, sap_rpt, prompt_registry, and LangChain modules, and registers all new functions as FastAPI endpoints in server.py. All endpoints can be tested directly via the FastAPI server.