Currently MacroDroid supports the import of cURL (string) in the "HTTP Request" action, most APIs also include this cURL code, it may be a good alternative for your main objective.The ability to request an api through Python code could make requests easier to use due to already created Python codes by developers for their apies
Currently MacroDroid supports the import of cURL (string) in the "HTTP Request" action, most APIs also include this cURL code, it may be a good alternative for your main objective.
On the same Open AI page, apart from the Python demo code, it also shows you the code option in cURLI tried to import this python example as cURL
```
import requests openai_api_key = 'ADD YOUR KEY HERE' file_path = '/path/to/file/audio.mp3' # Add the Path of your audio file headers = { 'Authorization': f'Bearer {openai_api_key}', } files = { 'file': open(file_path, 'rb'), 'model': (None, 'whisper-1'), }
```
and nothing happened
It says: "java.lang.IllegalStateException: scheme == null"On the same Open AI page, apart from the Python demo code, it also shows you the code option in cURL
thanksThe API can be accessed with the HTTP Request Shortcuts application.
1.Install HTTP Request Shortcuts.
HTTP Request Shortcuts - Apps on Google Play
Submit HTTP Requests from Shortcuts on your Home Screen.play.google.com
2.Import openai_shortcut.zip.
3.Select Hello World.MP3(Unzip Hello World.zip) in the Request Body/Parameters file.
4.Import OpenAI_Speech_to_text.macro.
5.Set the local variable openai_api_key.
6.Edit Actions and re-select OpenAI_Speech_to_text.
7.Execute the macro.
How to port api with this methods?The API can be accessed with the HTTP Request Shortcuts application.
1.Install HTTP Request Shortcuts.
HTTP Request Shortcuts - Apps on Google Play
Submit HTTP Requests from Shortcuts on your Home Screen.play.google.com
2.Import openai_shortcut.zip.
3.Select Hello World.MP3(Unzip Hello World.zip) in the Request Body/Parameters file.
4.Import OpenAI_Speech_to_text.macro.
5.Set the local variable openai_api_key.
6.Edit Actions and re-select OpenAI_Speech_to_text.
7.Execute the macro.