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

feature: user generated logs #510

Merged
merged 1 commit into from
Oct 29, 2024
Merged

feature: user generated logs #510

merged 1 commit into from
Oct 29, 2024

Conversation

geclos
Copy link
Collaborator

@geclos geclos commented Oct 28, 2024

This commit implements the ability to upload user generated logs to a project. It adds a new route for uploading logs and a new page for the user to upload logs. Logs are stored in the same way as regular document logs but they lack some optional fields such as duration, cost, token count or finish reason. The only required field is the messages array.

@geclos geclos force-pushed the feature/upload_logs branch from b4c0c98 to b9db3dd Compare October 28, 2024 08:17
@geclos geclos force-pushed the feature/upload_logs branch 4 times, most recently from a919d14 to dcee876 Compare October 28, 2024 12:21
Copy link
Contributor

Choose a reason for hiding this comment

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

Small thing: A bit weird call it post. Better create

@geclos geclos force-pushed the feature/upload_logs branch 9 times, most recently from 2fae609 to ffbf0ff Compare October 28, 2024 14:41
import { Hono } from 'hono'

import { chatHandler } from './handlers/chat'

export const chatsRouter = new Hono()

chatsRouter.post(ROUTES.Api.V1.Conversations.Chat, ...chatHandler)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm removing this crap, it's worse than having regular string literals even if it causes some minor duplicity

Copy link
Contributor

Choose a reason for hiding this comment

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

I see conflicts in my near future

}
},
"types": {
"index.d.ts": "./dist/index.d.ts"
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

our exports were all wrong and we weren't exporting types correctly, working on the example quickly surfaced these issues

@geclos geclos force-pushed the feature/upload_logs branch 4 times, most recently from 4885709 to a9e391d Compare October 29, 2024 10:51
@geclos geclos force-pushed the feature/upload_logs branch from a9e391d to 4335467 Compare October 29, 2024 11:49
@geclos geclos merged commit d2c2608 into main Oct 29, 2024
3 checks passed
@geclos geclos deleted the feature/upload_logs branch October 29, 2024 11:53
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants