Plan for elastic/kibana#289344: Enhance as a header title action
Related: elastic/kibana#289344
Start from main. Do not use the current menu-AI POC branch.
Enhance belongs with Favorite and Share, after the title, not in the app menu.
Plan for elastic/kibana#289344: Enhance as a header title action
Related: elastic/kibana#289344
Start from main. Do not use the current menu-AI POC branch.
Enhance belongs with Favorite and Share, after the title, not in the app menu.
Current (2023-03-01) OpenAI Whisper API expects a file uploaded as part of multipart/form-data in POST request.
I initially struggled to use this API inside Node.js with an audio file stored inside an AWS s3 bucket, so I decided to share this snippet:
The API usage example from the OpenAI docs:
curl --request POST \
--url https://api.openai.com/v1/audio/transcriptions \
--header 'Authorization: Bearer TOKEN' \
--header 'Content-Type: multipart/form-data' \
| git branch | grep -v "master" | xargs git branch -D |
| const scrollToBottom = (el, smooth) => { | |
| el.scroll({ | |
| top: el.scrollHeight, | |
| behavior: smooth ? 'smooth' : 'instant' | |
| }); | |
| }; | |
| const vChatScroll = { | |
| bind: (el, binding) => { | |
| let scrolled = false; |
| lsof -i tcp:3000 |
| var articleModel = (function () { | |
| var GLOBAL_ARTICLES = [{ | |
| "id": "news/2017/02/28/rossiya-snimet-zapret-na-import-moldavskih-vin", | |
| "title": "Россия снимет запрет на импорт молдавских вин", | |
| "author": "Meduza", | |
| "createdAt": new Date("2017-02-28T05:24:23.856Z"), | |
| "content": "Content of post", | |
| "summary": "Summary of post" | |
| }]; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <link rel="stylesheet" href="./styles.css"> | |
| </head> | |
| <body> | |
| <div class="header"> |
| var articles = [{ | |
| "id": "news/2017/02/28/rossiya-snimet-zapret-na-import-moldavskih-vin", | |
| "title": "Россия снимет запрет на импорт молдавских вин", | |
| "author": "sports", | |
| "createdAt": "2017-02-28T05:24:23.856Z", | |
| "content": "Content of post", | |
| "summary": "Summary of post" | |
| }]; | |
| // Сериализуем его |
| { | |
| "id": "news/2017/02/28/rossiya-snimet-zapret-na-import-moldavskih-vin", | |
| "title": "Россия снимет запрет на импорт молдавских вин", | |
| "author": "sports", | |
| "createdAt": "2017-02-28T05:24:23.856Z", | |
| "content": "Content of post", | |
| "summary": "Summary of post" | |
| } |
| <form name="filter"> | |
| <div class="filter-item filter-date">Фильтр по дате: от: <input name="date-from" type="date" /> до: <input name="date-to" type="date" /></div> | |
| <div class="filter-item filter-author">Фильтр по автору: | |
| <!-- Тут хардкод. По заданию вам надо из javascript наполнять <select> Пример: http://learn.javascript.ru/form-elements#добавьте-опцию-к-селекту --> | |
| <select name="author"> | |
| <option value="all" selected>Все</option> | |
| <option value="meduza">Meduza</option> | |
| <option value="ria">Риа Новости</option> | |
| <option value="sports">Sports.ru</option> | |
| </select> |