Changeset View
Changeset View
Standalone View
Standalone View
lib/open_ai.ex
defmodule OpenAi do | defmodule OpenAi do | ||||
def post(path, data, options \\ []) do | def post(path, data, options \\ []) do | ||||
config = Application.get_env(:lsg, :openai, []) | config = Application.get_env(:nola, :openai, []) | ||||
url = "https://api.openai.com#{path}" | url = "https://api.openai.com#{path}" | ||||
headers = [{"user-agent", "internal private experiment bot, href@random.sh"}, | headers = [{"user-agent", "internal private experiment bot, href@random.sh"}, | ||||
{"content-type", "application/json"}, | {"content-type", "application/json"}, |