azure-samples / jp-azureopenai-samples Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Please provide us with the following information:
x
)- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Error that occurs when running adz up on Dev Container
azd up
Running "prepdocs.py"
Ensuring search index gptkbindex exists
Creating gptkbindex search index
Traceback (most recent call last):
File "/workspaces/jp-azureopenai-samples/5.internal-document-search/./scripts/prepdocs.py", line 305, in <module>
create_search_index()
File "/workspaces/jp-azureopenai-samples/5.internal-document-search/./scripts/prepdocs.py", line 260, in create_search_index
index_client.create_index(index)
File "/workspaces/jp-azureopenai-samples/5.internal-document-search/scripts/.venv/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/jp-azureopenai-samples/5.internal-document-search/scripts/.venv/lib/python3.11/site-packages/azure/search/documents/indexes/_search_index_client.py", line 211, in create_index
result = self._client.indexes.create(patched_index, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/jp-azureopenai-samples/5.internal-document-search/scripts/.venv/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/jp-azureopenai-samples/5.internal-document-search/scripts/.venv/lib/python3.11/site-packages/azure/search/documents/indexes/_generated/operations/_indexes_operations.py", line 403, in create
raise HttpResponseError(response=response, model=error)
azure.core.exceptions.HttpResponseError: () Authorization failed.
Code:
Message: Authorization failed.
ERROR: failed running post hooks: 'postprovision' hook failed with exit code: '1', Path: './scripts/prepdocs.sh'. : exit code: 1
Expect azd up
to complete successfully
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
This will occur by executing the procedure in README.md as a user with Microsoft Authorization/roleAssignments/write
privileges on the Dev container
→ az role assignment list --assignee [email protected] --subscription aaa1088f-xxxxx-xxxxx-xxxxxxxxxx --output table
Principal Role Scope
----------------------- ------------------------- ---------------------------------------------------
[email protected] User Access Administrator /subscriptions/aaa1088f-xxxx-xxxx-xxxx-xxxxxxxxxx
Similar Issue Azure-Samples/azure-search-openai-demo#17
x
)- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
The following typos appear in these documents
"Azure Form Recgonizer"
targets:
https://github.com/Azure-Samples/jp-azureopenai-samples/blob/main/5.internal-document-search/README.md
https://github.com/Azure-Samples/jp-azureopenai-samples/blob/main/5.internal-document-search/deploy_private_endpoint_ennabled.md
Can you please correct the following typo?
"Azure Form Recgonizer" -> "Azure Form Recognizer"
Run the following command to add license
$ addlicense -f LICENSE.md .
Please provide us with the following information:
x
)- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Could you please explain a reason why does a web browser access to AOAI directly?
Ex: in Sample 5.
It seems that this is just illustration issue.
But if the implemetation is same as the illustration, I think it's better and more secure that all requests from the web browser to AOAI are handled by a web application in App Service.
・az コマンドラインが入っていない場合、cosmos db のカスタム RBAC 作成・割り当て作業時にエラーが出る
・az login 処理が不足している
・複数サブスクリプションが操作可能な場合、対象サブスクリプションが az account set -s でセットされていないと、cosmos db のカスタム RBAC 作成時にリソースグループがないと怒られる
winget install microsoft.AzureCLI
az login
az account set -s ...
を作業に追加
x
)- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
5.internal-document-search
Windows11環境にて、「スクラッチでの開始」の手順を実施すると、次のような権限エラーが出てデプロイに失敗します。
<以前省略>
Running "prepdocs.py"
Assume azd credential
Ensuring search index gptkbindex exists
Traceback (most recent call last):
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts\prepdocs.py", line 305, in
create_search_index()
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts\prepdocs.py", line 243, in create_search_index
if args.index not in index_client.list_index_names():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts.venv\Lib\site-packages\azure\core\paging.py", line 123, in next
return next(self._page_iterator)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts.venv\Lib\site-packages\azure\core\paging.py", line 75, in next
self._response = self._get_next(self.continuation_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts.venv\Lib\site-packages\azure\search\documents\indexes_generated\operations_indexes_operations.py", line 520, in get_next
raise HttpResponseError(response=response, model=error)
azure.core.exceptions.HttpResponseError: () Authorization failed.
Code:
Message: Authorization failed.
<以後省略>
Windows 11 Pro 22H2
このプルリクエストと同じ問題ではないかと思います。
Fix non-subscription owner scenarios by adding Search Service Contributor role #220
Azure-Samples/azure-search-openai-demo#220
実行ユーザーにBLOB共同作成者と検索共同作成者のロールを追加する必要があるようです。
このプルリクエストのパッチを充てるとエラーなく動くようになりました。
Please provide us with the following information:
x
)- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Thanks! We'll be in touch soon.
Please provide us with the following information:
x
)- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
See details in README
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Ubuntu on WSL2
Thanks! We'll be in touch soon.
5.internal-document-search のサンプルをREADMEの記載通りにデプロイし、デプロイはエラーなく成功したもののアプリにアクセスすると Application Error で正常動作していない。
kuduのLog streamでログを確認するとCosmosDBの権限不足?のようなエラーが発生している。
Request is blocked because principal <GUID> does not have required RBAC permissions to perform action [Microsoft.DocumentDB/databaseAccounts/readMetadata] on resource [dbs/****]. Learn more: https://aka.ms/cosmos-native-rbac.
以下のQiita記事を参考に、CosmosDBの組み込みロールCosmos DB Built-in Data Contributor
をManaged IDに付与することでエラーが解消し、アプリが動作するようになった。
https://qiita.com/coitate/items/a0e4df2d330b4f488cd0
具体的にはAz CLIを用いて以下のコマンドを実行した。
az cosmosdb sql role assignment create --account-name <CosmosDB名> --resource-group <ResourceGroup名> --scope "/" --principal-id <エラーログに記録されているPrincipalID> --role-definition-id /subscriptions/<subscription-id>/resourceGroups/<ResouceGroup名>/providers/Microsoft.DocumentDB/databaseAccounts/<CosmodDB名>/sqlRoleDefinitions/00000000-0000-0000-0000-000000000002
おそらくBicepを使ってこのロール割り当てを自動化することができると思うが、自分がBicepについて無知なのでそこまではできなかった。
Please provide us with the following information:
x
)- [o ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
1.call-center コールセンター向け AI アシスタントをローカル デバッグ環境で実行する際、会話の文字起こしを実行しよう録音ボタンを押すと、エラーメッセージが 会話の文字起こし の枠内に表示される
エラーメッセージ "TypeError: Cannot read properties of undefined (reading 'getProperty')"
録音ボタンを押した際に、会話の文字起こしが実行される
Ubuntu 22.04
上記で JavaScript 向けの Speech SDK である microsoft-cognitiveservices-speech-sdk の latest が使用される。
2023 年 8 月 16 日現在、latest として 1.31.0 が使用されるが、1.31.0 ではなく、1.24.0 等の古いバージョンを用いると上記のエラーメッセージが生じなくなり、正常に会話の文字起こしが実行される。
https://www.npmjs.com/package/microsoft-cognitiveservices-speech-sdk?activeTab=versions
Thanks! We'll be in touch soon.
In the original version of appservice.bicep, appSettings was not wrapped with an @secure decorator, so if a developer put any secrets in their app settings, it would leak into deployment outputs and cause a security alert. The latest version now has the secure decorator.
I noticed this repo is using the old version, so I recommend upgrading if you can.
You can git clone https://github.com/azure/azure-dev and then cp like this:
cp ../azure-dev/templates/common/infra/bicep/core/host/* infra/core/host/.
Or only cp app service files if you don't use other hosts:
cp ../azure-dev/templates/common/infra/bicep/core/host/appservice* infra/core/host/.
Then run azd up to make sure all still works.
Please provide us with the following information:
x
)- [ ] bug report
- [ ] feature request
- [x ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
minor issue: in internal deployment section on 5.internal-document-search
, it is illustrated that app-service-private-endpoint
is on the sub-app-{resource token}
subnet, but in the main.bicep
file, it looks like that appServicePrivateEndopoint
is using privateEndpointLocation
for its location.
maybe it is more suitable for the illustration to put
app-service-private-endpoint
in thesub-private-endpoint-{resource token}
subnet instead (or change the code, whichever is easier).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.