OpenAI API の概要を理解しておく
ChatGPT、DALL·E、Whisper 等のプロダクトで知られる OpenAI の API の概要を把握すべく 2023-01-26 に軽く触ってみたので、メモを残す。
- https://beta.openai.com/docs/introduction
- 素直にここから読んでいった
- https://beta.openai.com/docs/quickstart
- こういうことができるよ、って話
- Content generation
- Summarization
- Classification, categorization, and sentiment analysis
- Data extraction
- Translation
- Many more!
- ブラウザ上で動くデモに触れながら Completion を学んでいく
- Completion は日本語でいうと「補完」ってところかね?
temperatureというパラメータを指定する- 0 〜 1 の値
- 1 に近いほど結果のばらつきが大きくなる
- Node.js 製のサンプル
- https://github.com/openai/openai-quickstart-node
- 起動すると http://localhost:3000/ でウェブアプリケーションが動く
- https://beta.openai.com/account/api-keys
- こういうことができるよ、って話
- https://beta.openai.com/docs/libraries
- https://beta.openai.com/docs/models
- https://beta.openai.com/docs/usage-policies
- 悲しいことをやっちゃダメだよ、って話
- https://beta.openai.com/docs/guides/completion
- 自然言語のテキスト補完
- https://beta.openai.com/docs/guides/code
- プログラミング言語のコード補完
- https://beta.openai.com/docs/guides/images
- https://beta.openai.com/docs/guides/fine-tuning
- モデルのチューニング方法
- https://beta.openai.com/docs/guides/embeddings/what-are-embeddings
- Embedding、埋め込み?
- こういうことに使えるよ
- Search (where results are ranked by relevance to a query string)
- Clustering (where text strings are grouped by similarity)
- Recommendations (where items with related text strings are recommended)
- Anomaly detection (where outliers with little relatedness are identified)
- Diversity measurement (where similarity distributions are analyzed)
- Classification (where text strings are classified by their most similar label)
- あんまりわかっていない
- https://beta.openai.com/docs/guides/moderation
- Moderation って日本語だとなんだろう、検閲みたいな?
- こういうのを抽出できる
- hate
- hate/threatening
- self-harm
- sexual
- sexual/minors
- violence
- violence/graphic
- https://beta.openai.com/docs/guides/rate-limits
- https://beta.openai.com/docs/guides/error-codes
- https://beta.openai.com/docs/guides/safety-best-practices
- https://beta.openai.com/docs/api-reference/introduction