Skip to content

Commit

Permalink
chore: add mai-sc to turbo #283
Browse files Browse the repository at this point in the history
  • Loading branch information
srizvi committed Apr 28, 2024
1 parent 0d79d4b commit 0f62453
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
5 changes: 3 additions & 2 deletions apps/mai-sc/src/lib/chat/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { z } from 'zod';
import { SpinnerIcon } from '@yocxo/ui/icons';

import { saveChat } from '#/app/actions';
import { env } from '#/env';
import {
formatNumber,
nanoid,
Expand All @@ -40,7 +41,7 @@ import { Stocks } from '#/ui/stocks/stocks';
import { StocksSkeleton } from '#/ui/stocks/stocks-skeleton';

const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY ?? '',
apiKey: env.OPENAI_API_KEY ?? '',
});

async function confirmPurchase(symbol: string, price: number, amount: number) {
Expand Down Expand Up @@ -154,7 +155,7 @@ async function submitUserMessage(content: string) {
content: `\
You are a social media post creation assistant for Smarcomms, a social media marketing agency. Your purpose is to help our creative team mock up inspiring Facebook posts that adhere to the Jobs-to-be-Done (JTBD) framework, sparking ideas and driving results for our clients.
IF THE USER REQUESTS ANY FACEBOOK POST, call \`show_facebook_post_with_image\` to display the post.
IF THE USER REQUESTS ANY FACEBOOK POST, call \`show_facebook_post\` to display the post.
When creating posts for various SMB verticals (e.g., bakeries, fitness studios, retailers), focus on addressing the core, functional, emotional, and social jobs of our clients' customers:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packageManager": "[email protected]",
"scripts": {
"build": "turbo build",
"clean": "git clean -xdf node_modules && rm -f pnpm-lock.yaml",
"clean": "git clean -xdf node_modules",
"clean:workspaces": "turbo clean",
"db:push": "pnpm -F db push",
"db:studio": "pnpm -F db studio",
Expand Down
29 changes: 29 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,35 @@
".vercel/output/**"
]
},
"@yocxo/mai-sc#build": {
"dependsOn": ["^build"],
"env": [
"AUTH_SECRET",
"EXA_API_KEY",
"KV_URL",
"KV_REST_API_URL",
"KV_REST_API_TOKEN",
"KV_REST_API_READ_ONLY_TOKEN",
"OPENAI_API_KEY",
"OPENAI_API_MODEL",
"OPENAI_API_ORG",
"NEXT_PUBLIC_APP_URL",
"SPECIFIC_API_BASE",
"SPECIFIC_API_KEY",
"SPECIFIC_API_MODEL",
"TAVILY_API_KEY",
"UPSTASH_REDIS_REST_TOKEN",
"UPSTASH_REDIS_REST_URL",
"USE_SPECIFIC_API_FOR_WRITER"
],
"outputs": [
".next/**",
"!.next/cache/**",
"next-env.d.ts",
".output/**",
".vercel/output/**"
]
},
"@yocxo/web#build": {
"dependsOn": ["^build"],
"env": [
Expand Down

0 comments on commit 0f62453

Please sign in to comment.