feat(secrets): loaded from env

This commit is contained in:
Stan Girard 2023-05-18 01:26:35 +02:00
parent 58630f7207
commit 5147e6fcdd
2 changed files with 13 additions and 7 deletions

View File

@ -7,15 +7,19 @@ export default function HomePage() {
<div className="m-4 p-6 max-w-md mx-auto bg-white rounded-xl shadow-md flex items-center space-x-4">
<h1 className="mb-4 text-xl font-bold text-gray-900">Welcome!</h1>
<div className="flex flex-col space-y-4">
<Link href="/chat">
<a className="px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700">
<Link
href="/chat"
className="px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700">
Go to Chat
</a>
</Link>
<Link href="/upload">
<a className="px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700">
<Link
href="/upload"
className="px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700">
Go to Upload
</a>
</Link>
</div>
</div>

View File

@ -32,7 +32,9 @@ app.add_middleware(
allow_headers=["*"],
)
supabase_url = os.environ.get("SUPABASE_URL")
supabase_key = os.environ.get("SUPABASE_SERVICE_KEY")
openai_api_key = os.environ.get("OPENAI_API_KEY")
anthropic_api_key = ""
supabase: Client = create_client(supabase_url, supabase_key)
embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key)