mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-07 01:13:21 +00:00
wip create openai client
This commit is contained in:
@@ -3,9 +3,14 @@ from rest_framework.decorators import api_view
|
||||
from rest_framework.response import Response
|
||||
from minio import Minio
|
||||
from django.conf import settings
|
||||
import openai
|
||||
|
||||
MINIO_BUCKET = "livekit-staging-livekit-egress"
|
||||
|
||||
openai_client = openai.OpenAI(
|
||||
api_key=settings.OPENAI_API_KEY,
|
||||
)
|
||||
|
||||
# todo - discuss retry policy if the webhook fail
|
||||
@api_view(["POST"])
|
||||
def minio_webhook(request):
|
||||
|
||||
@@ -396,6 +396,10 @@ class Base(Configuration):
|
||||
MINIO_URL = values.Value(
|
||||
None, environ_name="MINIO_URL", environ_prefix=None
|
||||
)
|
||||
OPENAI_API_KEY = values.Value(
|
||||
None, environ_name="OPENAI_API_KEY", environ_prefix=None
|
||||
)
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
@property
|
||||
def ENVIRONMENT(self):
|
||||
|
||||
@@ -59,6 +59,7 @@ dependencies = [
|
||||
"mozilla-django-oidc==4.0.1",
|
||||
"livekit-api==0.7.0",
|
||||
"minio==7.2.9",
|
||||
"openai==1.51.2"
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
|
||||
@@ -109,6 +109,10 @@ backend:
|
||||
secretKeyRef:
|
||||
name: backend
|
||||
key: MINIO_URL
|
||||
OPENAI_API_KEY:
|
||||
secretKeyRef:
|
||||
name: backend
|
||||
key: OPENAI_API_KEY
|
||||
|
||||
createsuperuser:
|
||||
command:
|
||||
|
||||
@@ -24,3 +24,6 @@ stringData:
|
||||
{{- if .Values.minioUrl }}
|
||||
MINIO_URL: {{ .Values.minioUrl }}
|
||||
{{- end }}
|
||||
{{- if .Values.openaiApiKey }}
|
||||
OPENAI_API_KEY: {{ .Values.openaiApiKey }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user