Closed lifan0127 closed 2 weeks ago
@microsoft-github-policy-service agree company="IFF"
The changes look good. Could you add a sample as well. You can look at this: JS PR, JS azureOpenAI sample. Most of the sample files are scaffolding which you can copy from python sample.
Hi @singhk97 I have added an example based on the JS example: https://github.com/microsoft/teams-ai/tree/main/js/samples/04.ai-apps/h.datasource-azureOpenAI
@lifan0127 I've picked up your commits and made a few tweaks in this PR: #1759. Thanks!
Linked issues
closes: #1730
related PR: https://github.com/microsoft/teams-ai/pull/1426 (JS implementation)
Details
Hi, I recently needed to create a Python-based RAG bot using
teams-ai
and realized the "Azure OpenAI On Your Data" feature was not quite complete. So I made some small changes to make it work.Change details
code snippets:
The main change is to add the data source info in to the
extra_body
for the OpenAI API call:Attestation Checklist
[x] My code follows the style guidelines of this project
I have checked for/fixed spelling, linting, and other errors
I have commented my code for clarity
I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient)
Additional information