This repo is a work-in-progress compilation of my samples based on Azure OpenAI Service and OpenAI API offered models. These samples are intended to simply convey the concepts and capabilities with code samples that are concise but sufficient to show how Generative AI can be applied to real-world scenarios.
I will mostly be using the common OpenAI Python SDK that supports both Azure OpenAI and OpenAI.
For the service endpoint and credentials, I will use Azure OpenAI service and credentials for the most part because it's personally convenient. Regardless, the features and samples are applicable to both services.
- Functions: Showcases the new "functions" feature with a simple example that transforms the user input into pre-defined functions invoked from the code, and the output sent back to GPT to get a natural language response, completing the semantic-syntactical-semantic loop.
- Extraction: A variation on the OpenAI extraction example that adds numeric data to the input and CSV formatted response, loads it into a dataframe and plots it as a line chart.
- LangChain: How to use LangChain with Azure OpenAI focusing on the new multiple tools feature and optionally disabling the parallel tools calling.