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

[editor] Run Prompt (non-streaming) #667

Merged
merged 4 commits into from
Dec 29, 2023
Merged

[editor] Run Prompt (non-streaming) #667

merged 4 commits into from
Dec 29, 2023

Conversation

rholinshead
Copy link
Contributor

@rholinshead rholinshead commented Dec 29, 2023

[editor] Run Prompt (non-streaming)

[editor] Run Prompt (non-streaming)

With non-streaming /run endpoint properly returning the response now, we can update the client config with the resulting output. We can also leverage the client-side _ui state for maintaining 'isRunning' state to show a spinner / disable the execute button for now (TODO: we may need to handle canceling execution as well).

Screen.Recording.2023-12-28.at.10.24.45.PM.mov

Stack created with Sapling. Best reviewed with ReviewStack.

Ryan Holinshead added 4 commits December 29, 2023 10:28
# [editor] Model Selector

Implement the model selector and add a placeholder call to the future api endpoint for updating the model.


https://github.com/lastmile-ai/aiconfig/assets/5060851/812f3a10-aaac-4ec3-9f1f-4d21ebc99e9f
# [editor] Support Deleting Prompt

Add the UI side for deleting a prompt, with placeholder to call the server endpoint once it's implemented


https://github.com/lastmile-ai/aiconfig/assets/5060851/b3e682dd-a3ed-45c1-b153-b4b6e2094616
# [editor] Use Prompt ID Instead of Index for Client-side State Actions

We can uniquely identify prompts in client-side state using their client-side id, so let's use that instead of index for referencing them in the actions. This should be a bit more robust than using index.

## Testing:
Went through all relevant actions and made sure they work as expected
# [editor] Run Prompt (non-streaming)

With non-streaming /run endpoint properly returning the response now, we can update the client config with the resulting output. We can also leverage the client-side `_ui` state for maintaining 'isRunning' state to show a spinner / disable the execute button for now (TODO: we may need to handle canceling execution as well).


https://github.com/lastmile-ai/aiconfig/assets/5060851/67fa793a-9a60-4285-a7d1-69fff633d6a6
rholinshead added a commit that referenced this pull request Dec 29, 2023
[editor] Support Deleting Prompt

# [editor] Support Deleting Prompt

Add the UI side for deleting a prompt, with placeholder to call the
server endpoint once it's implemented



https://github.com/lastmile-ai/aiconfig/assets/5060851/b3e682dd-a3ed-45c1-b153-b4b6e2094616

---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/665).
* #667
* #666
* __->__ #665
* #662
@@ -12,6 +12,7 @@ export type EditorFile = {
export type ClientPrompt = Prompt & {
_ui: {
id: string;
isRunning?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@rossdanlm rossdanlm left a comment

Choose a reason for hiding this comment

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

nice, looks good!

@rholinshead rholinshead merged commit 164f0b0 into main Dec 29, 2023
2 checks 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