openai
Mix.install(
[
{:kino, "~> 0.10.0"},
{:openai, "~> 0.3.1"}
],
config: [
openai: [
api_key: System.get_env("LB_TOKEN"),
http_options: [recv_timeout: 30_000]
]
]
)
Section
{:ok, result} =
OpenAI.chat_completion(
model: "gpt-3.5-turbo",
messages: [
%{
role: "user",
content: "ウサギと亀、どっちが速い。"
}
]
)
# result
# |> Kino.Tree.new()