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

refact openai v2v #438

Merged

Conversation

TomasBack2Future
Copy link
Collaborator

No description provided.

messages.extend(self.memory.get())

history = self.memory.get()
while history:
Copy link
Contributor

Choose a reason for hiding this comment

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

while len(history) > 0?

users_count = 0

completion_times = []
Copy link
Contributor

Choose a reason for hiding this comment

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

for metrics maybe create a utility class?

we can use like

metrics.mark("connect_times")
## after some seconds
elapse = metrics.elapse("connect_times")

r = await response.json()
self.ten_env.log_error(f"Received unexpected status {r} from the server.")
return
async with aiohttp.ClientSession() as session:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe cache it to avoid overhead?

Copy link
Contributor

@plutoless plutoless left a comment

Choose a reason for hiding this comment

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

leave some comments

@plutoless plutoless merged commit 817a1e3 into TEN-framework:main Dec 2, 2024
1 check passed
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.

2 participants