Skip to content

Commit

Permalink
Merge branch 'main' into staging/deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
knajjars authored Aug 12, 2024
2 parents be3637c + d779bf9 commit 7464c6f
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 35 deletions.
29 changes: 24 additions & 5 deletions .env-template
Original file line number Diff line number Diff line change
@@ -1,78 +1,97 @@
# REQUIRED VARIABLES

NEXT_PUBLIC_API_HOSTNAME=http://localhost:8000
DATABASE_URL=postgresql+psycopg2://postgres:postgres@db:5432

# Migrate access token, used to authenticate requests to the migrate endpoint.

# You can generate it using some random string generator.

MIGRATE_TOKEN=<MIGRATE_TOKEN>

# TOOLS

PYTHON_INTERPRETER_URL=http://terrarium:8080
TAVILY_API_KEY=<API_KEY_HERE>
WOLFRAM_APP_ID=<APP_ID_HERE>

# CORAL WEB

NEXT_PUBLIC_HAS_CUSTOM_LOGO=false
NEXT_PUBLIC_DARK_MODE=false

# DEPLOYMENTS

# To use the Toolkit, at least one deployment must be setup, the simplest

# being the Cohere Platform. See the README.md for more details.

# 1 - Cohere Platform
# 1 - Cohere Platform

COHERE_API_KEY=<API_KEY_HERE>

# 2 - SageMaker

SAGE_MAKER_ACCESS_KEY=<ACCESS KEY>
SAGE_MAKER_SECRET_KEY=<SECRET KEY>
SAGE_MAKER_SESSION_TOKEN=<SESSION TOKEN>
SAGE_MAKER_REGION_NAME=<REGION NAME>
SAGE_MAKER_ENDPOINT_NAME=<ENDPOINT NAME>

# 3 - Azure

AZURE_API_KEY=<API KEY>
AZURE_CHAT_ENDPOINT_URL=<ENDPOINT URL>

# 4 - Bedrock

BEDROCK_ACCESS_KEY=<ACCESS KEY>
BEDROCK_SECRET_KEY=<SECRET KEY>
BEDROCK_SESSION_TOKEN=<SESSION TOKEN>
BEDROCK_REGION_NAME=<REGION NAME>

# Experimental features
# Experimental features

USE_EXPERIMENTAL_LANGCHAIN=False
USE_AGENTS_VIEW=False

# Community features

USE_COMMUNITY_FEATURES='True'

# For setting up authentication, see: docs/auth_guide.md

AUTH_SECRET_KEY=<See auth.guide.md on how to generate a secure one>

# Required for specifying OAuth Redirect URI

FRONTEND_HOSTNAME=http://localhost:4000
NEXT_PUBLIC_FRONTEND_HOSTNAME=${FRONTEND_HOSTNAME}

# Redis

REDIS_URL=redis://:redis@redis:6379

# Google OAuth
# Google OAuth

GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>
GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET>

# OpenID Connect

OIDC_CLIENT_ID=<OIDC_CLIENT_ID>
OIDC_CLIENT_SECRET=<OIDC_CLIENT_SECRET>
OIDC_WELL_KNOWN_ENDPOINT=<OIDC_WELL_KNOWN_ENDPOINT>

# Compass

COHERE_COMPASS_USERNAME=
COHERE_COMPASS_PASSWORD=
COHERE_COMPASS_API_URL=
COHERE_COMPASS_PARSER_URL=

# Google Drive

GOOGLE_DRIVE_CLIENT_ID=
GOOGLE_DRIVE_CLIENT_SECRET=
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID=${GOOGLE_DRIVE_CLIENT_ID}
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY=
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY=
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ services:
NEXT_PUBLIC_FRONTEND_HOSTNAME: ${NEXT_PUBLIC_FRONTEND_HOSTNAME}
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID: ${NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID}
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY: ${NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY}
NEXT_PUBLIC_DARK_MODE: ${NEXT_PUBLIC_DARK_MODE}
restart: always
networks:
- proxynet
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/assistants_web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@microsoft/fetch-event-source": "^2.0.1",
"@popperjs/core": "^2.11.8",
"@react-hookz/web": "^23.1.0",
"@t3-oss/env-nextjs": "^0.11.0",
"@t3-oss/env-nextjs": "0.7.10",
"@tanstack/react-query": "^5.8.9",
"@tanstack/react-query-devtools": "^5.8.9",
"@types/babel__core": "^7.1.19",
Expand Down Expand Up @@ -115,4 +115,4 @@
"prettier-plugin-tailwindcss": "0.4.1",
"storybook": "^8.2.6"
}
}
}
4 changes: 1 addition & 3 deletions src/interfaces/assistants_web/src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export const env = createEnv({
NEXT_PUBLIC_FRONTEND_HOSTNAME: z.string().optional().default('http://localhost:4000'),
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID: z.string().optional(),
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY: z.string().optional(),
NEXT_PUBLIC_HAS_CUSTOM_LOGO: z.string().optional().default('false'),
NEXT_PUBLIC_DARK_MODE: z
NEXT_PUBLIC_HAS_CUSTOM_LOGO: z
.string()
.optional()
.default('false')
Expand All @@ -31,7 +30,6 @@ export const env = createEnv({
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID: readVariable('NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID'),
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY: readVariable('NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY'),
NEXT_PUBLIC_HAS_CUSTOM_LOGO: readVariable('NEXT_PUBLIC_HAS_CUSTOM_LOGO'),
NEXT_PUBLIC_DARK_MODE: readVariable('NEXT_PUBLIC_DARK_MODE'),
},
emptyStringAsUndefined: true,
skipValidation: ['lint', 'format', 'test', 'test:coverage', 'test:watch', 'build'].includes(
Expand Down
3 changes: 1 addition & 2 deletions src/interfaces/coral_web/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ NEXT_PUBLIC_API_HOSTNAME=http://localhost:8000
NEXT_PUBLIC_FRONTEND_HOSTNAME=http://localhost:4000
NEXT_PUBLIC_HAS_CUSTOM_LOGO=false
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID='client-id'
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY='developer-key'
NEXT_PUBLIC_DARK_MODE=false
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY='developer-key'
3 changes: 1 addition & 2 deletions src/interfaces/coral_web/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ NEXT_PUBLIC_API_HOSTNAME=http://localhost:8000
NEXT_PUBLIC_FRONTEND_HOSTNAME=http://localhost:4000
NEXT_PUBLIC_HAS_CUSTOM_LOGO=false
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID='client-id'
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY='developer-key'
NEXT_PUBLIC_DARK_MODE=false
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY='developer-key'
20 changes: 10 additions & 10 deletions src/interfaces/coral_web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/interfaces/coral_web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@microsoft/fetch-event-source": "^2.0.1",
"@popperjs/core": "^2.11.8",
"@react-hookz/web": "^23.1.0",
"@t3-oss/env-nextjs": "^0.11.0",
"@t3-oss/env-nextjs": "^0.7.1",
"@tanstack/react-query": "^5.8.9",
"@tanstack/react-query-devtools": "^5.8.9",
"@types/babel__core": "^7.1.19",
Expand Down Expand Up @@ -100,4 +100,4 @@
"prettier": "2.8.7",
"prettier-plugin-tailwindcss": "0.4.1"
}
}
}
4 changes: 1 addition & 3 deletions src/interfaces/coral_web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { cookies } from 'next/headers';

import { LayoutProviders } from '@/app/_providers';
import { COOKIE_KEYS } from '@/constants';
import { env } from '@/env.mjs';
import '@/styles/main.css';
import { cn } from '@/utils';

export const metadata: Metadata = {
title: {
Expand All @@ -20,7 +18,7 @@ const Layout: React.FC<React.PropsWithChildren> = ({ children }) => {
const cookieStore = cookies();
const authToken = cookieStore.get(COOKIE_KEYS.authToken)?.value;
return (
<html lang="en" className={cn({ dark: env.NEXT_PUBLIC_DARK_MODE })}>
<html lang="en">
<PublicEnvScript />
<body>
<CookiesProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const AgentsSidePanel: React.FC<React.PropsWithChildren<{ className?: str
>
<button onClick={() => navigateToNewChat()}>
<div className="mr-3 flex items-baseline">
<Logo hasCustomLogo={env.NEXT_PUBLIC_HAS_CUSTOM_LOGO === 'true'} />
<Logo hasCustomLogo={env.NEXT_PUBLIC_HAS_CUSTOM_LOGO} />
</div>
</button>
</Transition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const NavigationBar: React.FC<PropsWithChildren<{ className?: string }>>
>
<Link href="/">
<div className="mr-3 flex items-baseline">
<Logo hasCustomLogo={env.NEXT_PUBLIC_HAS_CUSTOM_LOGO === 'true'} />
<Logo hasCustomLogo={env.NEXT_PUBLIC_HAS_CUSTOM_LOGO} />
</div>
</Link>
{children}
Expand Down
4 changes: 1 addition & 3 deletions src/interfaces/coral_web/src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export const env = createEnv({
NEXT_PUBLIC_FRONTEND_HOSTNAME: z.string().optional().default('http://localhost:4000'),
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID: z.string().optional(),
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY: z.string().optional(),
NEXT_PUBLIC_HAS_CUSTOM_LOGO: z.string().optional().default('false'),
NEXT_PUBLIC_DARK_MODE: z
NEXT_PUBLIC_HAS_CUSTOM_LOGO: z
.string()
.optional()
.default('false')
Expand All @@ -31,7 +30,6 @@ export const env = createEnv({
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID: readVariable('NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID'),
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY: readVariable('NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY'),
NEXT_PUBLIC_HAS_CUSTOM_LOGO: readVariable('NEXT_PUBLIC_HAS_CUSTOM_LOGO'),
NEXT_PUBLIC_DARK_MODE: readVariable('NEXT_PUBLIC_DARK_MODE'),
},
emptyStringAsUndefined: true,
skipValidation: ['lint', 'format', 'test', 'test:coverage', 'test:watch', 'build'].includes(
Expand Down

0 comments on commit 7464c6f

Please sign in to comment.