-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor, better assistant #85
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for openduck ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
<button | ||
className={`orb-button min-w-32 bg-blue-500 hover:bg-blue-600 text-white rounded-full p-4 cursor-pointer shadow-lg transform transition-transform duration-300 ease-in-out ${ | ||
!userName && "opacity-50 cursor-not-allowed" | ||
className={`orb-button w-48 h-48 bg-blue-500 hover:bg-blue-600 text-white rounded-full p-4 cursor-pointer shadow-lg transform transition-transform duration-300 ease-in-out flex items-center justify-center text-2xl ${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This ESLint rule specifically enforces the usage of shorthand Tailwind CSS classnames, which promotes consistency in coding style by ensuring developers use Tailwind's optimized shorthand syntax where applicable. For instance, converting individual padding classes to a single shorthand
p-2
class in the provided example. - It helps in reducing the overall file size of the stylesheets by condensing multiple class declarations into fewer shorthand declarations. This can contribute to faster load times and better performance of web applications.
className={`orb-button w-48 h-48 bg-blue-500 hover:bg-blue-600 text-white rounded-full p-4 cursor-pointer shadow-lg transform transition-transform duration-300 ease-in-out flex items-center justify-center text-2xl ${ | |
className={`orb-button size-48 bg-blue-500 hover:bg-blue-600 text-white rounded-full p-4 cursor-pointer shadow-lg transform transition-transform duration-300 ease-in-out flex items-center justify-center text-2xl ${ |
<button | ||
className={`orb-button min-w-32 bg-blue-500 hover:bg-blue-600 text-white rounded-full p-4 cursor-pointer shadow-lg transform transition-transform duration-300 ease-in-out ${ | ||
!userName && "opacity-50 cursor-not-allowed" | ||
className={`orb-button w-48 h-48 bg-blue-500 hover:bg-blue-600 text-white rounded-full p-4 cursor-pointer shadow-lg transform transition-transform duration-300 ease-in-out flex items-center justify-center text-2xl ${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This ESLint rule specifically targets the migration process from Tailwind CSS v2 to v3 by identifying class names that have either become obsolete or have updated naming conventions in the newer version, making the upgrade smoother and ensuring that the project's styling remains consistent without manual checks.
- By automatically detecting and suggesting fixes for deprecated or changed class names, this rule not only reduces the time needed for developers to manually search and replace outdated classes but also minimizes the risk of errors that could lead to inconsistent UI/UX throughout the application.
className={`orb-button w-48 h-48 bg-blue-500 hover:bg-blue-600 text-white rounded-full p-4 cursor-pointer shadow-lg transform transition-transform duration-300 ease-in-out flex items-center justify-center text-2xl ${ | |
className={`orb-button w-48 h-48 bg-blue-500 hover:bg-blue-600 text-white rounded-full p-4 cursor-pointer shadow-lg transition-transform duration-300 ease-in-out flex items-center justify-center text-2xl${ |
</h1> | ||
<AudioCall callObject={callObject} /> | ||
<div className="flex-grow flex items-start"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This ESLint rule specifically targets the migration process from Tailwind CSS v2 to v3 by identifying class names that have either become obsolete or have updated naming conventions in the newer version, making the upgrade smoother and ensuring that the project's styling remains consistent without manual checks.
- By automatically detecting and suggesting fixes for deprecated or changed class names, this rule not only reduces the time needed for developers to manually search and replace outdated classes but also minimizes the risk of errors that could lead to inconsistent UI/UX throughout the application.
<div className="flex-grow flex items-start"> | |
<div className="grow flex items-start"> |
"role": "system", | ||
"content": system_prompt, | ||
} | ||
# new_message = {"role": "user", "content": transcription} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
|
||
# NOTE(zach): retries | ||
response = None | ||
for _retry in range(3): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to this PR but just wondering if the retries help? does it happen often that the openai API fails but then works again on retry? or is it a moderations thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure tbh, but I implemented this because things were flagged as moderation violations that clearly shouldn't have been
User description
Description
log_event
function to log events with metadata and audio to the database.ResponseAgent
class for handling audio transcription, normalization, TTS, and response generation.ResponseAgent
and added a new endpoint for podcast room creation.Changes walkthrough
db.py
Add event logging functionality with audio support
openduck-py/openduck_py/logging/db.py
log_event
to log various events with optionalmetadata and audio.
metadata, and latency.
response_agent.py
Implement ResponseAgent for audio processing and response generation
openduck-py/openduck_py/response_agent.py
ResponseAgent
class to handle audio responses.text-to-speech (TTS) generation.
using GPT models.
voice.py
Refactor voice router to use ResponseAgent and add podcast endpoint
openduck-py/openduck_py/routers/voice.py
ResponseAgent
class.response_agent.py
./start/podcast
to create a podcast room.page.tsx
Update UI elements and layout in the main page
web/src/app/page.tsx
__init__.py
Update environment variable handling with default values
openduck-py/openduck_py/settings/init.py
strings if not set.
daily.py
Ensure process termination after leaving daily event
openduck-py/openduck_py/utils/daily.py
termination.
🔍 Anti-patterns Detected:
openduck-py/openduck_py/response_agent.py
openduck-py/openduck_py/routers/voice.py
web/src/app/page.tsx
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.