Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Complete][Phase1] #57

Merged
merged 9 commits into from
Sep 21, 2024

Conversation

TechAlchemy423
Copy link

@TechAlchemy423 TechAlchemy423 commented Sep 6, 2024


Copy link

vercel bot commented Sep 6, 2024

@TechAlchemy423 is attempting to deploy a commit to the Deepgram Team Team on Vercel.

A member of the Team first needs to authorize it.

@TechAlchemy423
Copy link
Author

TechAlchemy423 commented Sep 6, 2024

- should use these environmental variables in your .env file.

(see discord)

- The UI is changed from original UI cuz of using Agent API. So plz check the UI and if you want to maintain original UI, it will take 2 days.

- I counted time for this work as 40 hrs.

This is Deepgram project and I need to read Deepgram documentation to get clear understand about this API logic and integration police

Previously I do not know about this Deepgram because it is not a popular framework like React.js or Next.js. This Deepgram is needed only for this project So I took some time like 2 days extra for learning. Because I work and read this documentation that I needed to work .

In addition, I also spent some time to familiarize with code base.

Yes, this takes only 4/5 days But I took some extra for this reason.

Copy link

vercel bot commented Sep 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
deepgram-conversational-demo ❌ Failed (Inspect) Sep 18, 2024 5:42pm
emilyai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 5:42pm

Comment on lines 78 to 90
const requestTtsAudio = useCallback(
async (message: Message) => {
if (!isAuthenticated) return;
const start = Date.now();
const model = ttsOptions?.model ?? "aura-asteria-en";

const res = await fetch(`/api/speak?model=${model}`, {
headers: {
Authorization: "Bearer " + token,
},
cache: "no-store",
method: "POST",
body: JSON.stringify(message),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is now unused (you've deleted the route.ts for this)

Comment on lines 160 to 168
} = useChat({
id: "aura",
api: "/api/brain",
headers: {
Authorization: `Bearer ${token}`,
},
initialMessages: [systemMessage, greetingMessage],
onFinish,
onResponse,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is now also unused (again, you've deleted the route.ts for this)

Comment on lines 420 to 440
// useEffect(() => {
// let keepAlive: any;
// if (connection && connectionReady && !microphoneOpen) {
// keepAlive = setInterval(() => {
// // should stop spamming dev console when working on frontend in devmode
// if (connection?.getReadyState() !== LiveConnectionState.OPEN) {
// clearInterval(keepAlive);
// } else {
// connection.keepAlive();
// }
// }, 10000);
// } else {
// clearInterval(keepAlive);
// }

// // prevent duplicate timeouts
// return () => {
// clearInterval(keepAlive);
// };
// }, [connection, connectionReady, microphoneOpen]);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more code to delete

package.json Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ricky0123/vad-react, onnxruntime-web and openai should all have been removed by now

/**
* Voice Options
*/
export const voices: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these options, keep the app simple for now


// models

export const models = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these too, we keep it very simple

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't even used anymore

@lukeocodes lukeocodes merged commit 89f017a into deepgram-devs:release/agent-api Sep 21, 2024
2 checks passed
lukeocodes added a commit that referenced this pull request Nov 11, 2024
* feat: added anonymous session to secure serverless endpoints (#54)

* feat: upgrade from stt-llm-tts to agent-api (#57)

* feat: added anonymous session to secure serverless endpoints

* feat: integrated anonymous session in client for specific route

* feat: added full authentication and hold some code for a dirty error

* fix: recommit fixed package-lock.json and added authentication

* chore: removed all redundent code and settings message
---------
Co-authored-by: TechAlchmy <[email protected]>
Co-authored-by: TechAlchemist <[email protected]>
Co-authored-by: lukeocodes <[email protected]>

* fix: style tweak

* feat: add banner to click back to v1

---------

Co-authored-by: TechAlchemist <[email protected]>
Co-authored-by: TechAlchemy423 <[email protected]>

BREAKING CHANGE: switching APIs from STT/LLM/TTS to Agent API changes the entire purpose of this demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants