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

[OPIK-536]: playground FE; #888

Merged
merged 24 commits into from
Dec 13, 2024
Merged

[OPIK-536]: playground FE; #888

merged 24 commits into from
Dec 13, 2024

Conversation

aadereiko
Copy link
Contributor

@aadereiko aadereiko commented Dec 13, 2024

Details

the very first version of the playground is ready.
image
image
image
image
image
image

Issues

Resolves #

Testing

Documentation

@aadereiko aadereiko requested a review from a team as a code owner December 13, 2024 10:55
ferc
ferc previously approved these changes Dec 13, 2024
Copy link
Collaborator

@ferc ferc left a 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));
Copy link
Collaborator

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

Comment on lines 72 to 74
const exposedStop = useCallback(() => {
stop();
}, [stop]);
Copy link
Collaborator

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(() => {
Copy link
Collaborator

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]: [
Copy link
Collaborator

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,

Copy link
Collaborator

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") || "";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the constant

@aadereiko aadereiko requested a review from ferc December 13, 2024 14:22
@ferc ferc merged commit 71ed65c into main Dec 13, 2024
1 check passed
@ferc ferc deleted the sashaa/OPIK-536/playground-fe branch December 13, 2024 14:49
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