-
Notifications
You must be signed in to change notification settings - Fork 60
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
Conversation
b4c0c98
to
b9db3dd
Compare
.../gateway/src/routes/api/v2/projects/[projectId]/versions/[versionUuid]/logs/handlers/post.ts
Outdated
Show resolved
Hide resolved
a919d14
to
dcee876
Compare
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.
Small thing: A bit weird call it post. Better create
.../gateway/src/routes/api/v2/projects/[projectId]/versions/[versionUuid]/logs/handlers/post.ts
Outdated
Show resolved
Hide resolved
2fae609
to
ffbf0ff
Compare
import { Hono } from 'hono' | ||
|
||
import { chatHandler } from './handlers/chat' | ||
|
||
export const chatsRouter = new Hono() | ||
|
||
chatsRouter.post(ROUTES.Api.V1.Conversations.Chat, ...chatHandler) |
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 removing this crap, it's worse than having regular string literals even if it causes some minor duplicity
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 see conflicts in my near future
} | ||
}, | ||
"types": { | ||
"index.d.ts": "./dist/index.d.ts" | ||
}, |
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.
our exports were all wrong and we weren't exporting types correctly, working on the example quickly surfaced these issues
4885709
to
a9e391d
Compare
a9e391d
to
4335467
Compare
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.