Skip to content

Commit

Permalink
chore: change demo app ids
Browse files Browse the repository at this point in the history
  • Loading branch information
drochetti committed Jan 15, 2024
1 parent f0f35ca commit 536d0af
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/demo-nextjs-app-router/app/camera-turbo/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default function WebcamPage() {
const previewRef = useRef<HTMLCanvasElement | null>(null);

const { send } = fal.realtime.connect<LCMInput, LCMOutput>(
'110602490-sd-turbo-real-time-high-fps-msgpack',
'fal-ai/sd-turbo-real-time-high-fps-msgpack',
{
connectionKey: 'camera-turbo-demo',
// not throttling the client, handling throttling of the camera itself
Expand Down
2 changes: 1 addition & 1 deletion apps/demo-nextjs-app-router/app/realtime/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const PROMPT = 'a moon in a starry night sky';
export default function RealtimePage() {
const [image, setImage] = useState<string | null>(null);

const { send } = fal.realtime.connect('110602490-lcm-sd15-i2i', {
const { send } = fal.realtime.connect('fal-ai/lcm-sd15-i2i', {
connectionKey: 'realtime-demo',
throttleInterval: 128,
onResult(result) {
Expand Down
2 changes: 1 addition & 1 deletion apps/demo-nextjs-app-router/app/whisper/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default function WhisperDemo() {
setLoading(true);
const start = Date.now();
try {
const result = await fal.subscribe('110602490-whisper', {
const result = await fal.subscribe('fal-ai/whisper', {
input: {
file_name: 'recording.wav',
audio_url: audioFile,
Expand Down
2 changes: 1 addition & 1 deletion apps/demo-nextjs-page-router/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function Index() {
setLoading(true);
const start = Date.now();
try {
const result: Result = await fal.subscribe('110602490/lora', {
const result: Result = await fal.subscribe('fal-ai/lora', {
input: {
prompt,
model_name: 'stabilityai/stable-diffusion-xl-base-1.0',
Expand Down
4 changes: 2 additions & 2 deletions libs/client/src/realtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ function shouldSendBinary(message: any): boolean {
* Get a token to connect to the realtime endpoint.
*/
async function getToken(app: string): Promise<string> {
const [_, ...appAlias] = app.split('-');
const [, appAlias] = ensureAppIdFormat(app).split('/');
const token: string | object = await dispatchRequest<any, string>(
'POST',
`${getRestApiUrl()}/tokens/`,
{
allowed_apps: [appAlias.join('-')],
allowed_apps: [appAlias],
token_expiration: TOKEN_EXPIRATION_SECONDS,
}
);
Expand Down

0 comments on commit 536d0af

Please sign in to comment.