-
Notifications
You must be signed in to change notification settings - Fork 212
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
[OPIK-536]: playground FE; #888
Conversation
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.
Amazing work, it looks very clean and nice details in architecture about the ref maps! 🚀
|
||
return useMutation({ | ||
mutationFn: async (trace: UseTraceCreateMutationParams) => { | ||
return await api.post(TRACES_REST_ENDPOINT, snakeCaseObj(trace)); |
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.
No need for await
if you're just returning the promise already
const exposedStop = useCallback(() => { | ||
stop(); | ||
}, [stop]); |
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.
Maybe remove?
}: PlaygroundPromptProps) => { | ||
const { name, id, messages, model, configs } = prompt; | ||
|
||
const provider = useMemo(() => { |
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.
Maybe useMemo
is an overkill here?
}; | ||
|
||
export const PLAYGROUND_MODELS = { | ||
[PLAYGROUND_PROVIDER.OpenAI]: [ |
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.
Add link above from where we should get this list so in case there are new models we can update the list
return { | ||
content: "", | ||
role: PLAYGROUND_MESSAGE_ROLE.system, | ||
|
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.
Remove
signal, | ||
configs, | ||
}: GetOpenAIStreamParams) => { | ||
const apiKey = window.localStorage.getItem("OPENAI_API_KEY") || ""; |
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.
Use the constant
Details
the very first version of the playground is ready.
Issues
Resolves #
Testing
Documentation