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

Refactor aiconfig.run() to not take in params method argument #671

Closed
rossdanlm opened this issue Dec 29, 2023 · 1 comment
Closed

Refactor aiconfig.run() to not take in params method argument #671

rossdanlm opened this issue Dec 29, 2023 · 1 comment

Comments

@rossdanlm
Copy link
Contributor

After we have added #668 (Python) and #669 (Typescript) to the AIConfig sdks, we no longer need to explicitly pass in the params into the run() function. This makes sense from a user experience perspective since you typically only want to have to set the params once, and then never have to think about them again when running each prompt

See #613 for an example of where this would be useful

We would need to ensure we do this for both Python and Typescript. We already have unit tests for the get_parameters() method so don't need to add more tests for what we already have (assuming they exist)

rossdanlm pushed a commit that referenced this issue Dec 29, 2023
TSIA, pretty simple otherwise we'd be using empty params field and that would error. For the future, I created issue #671 where we shouldn't even need to pass in params into run and this works implicitly

See #612 for example on how to test
rossdanlm pushed a commit that referenced this issue Dec 29, 2023
…eck for undefined prompt_name

TSIA, pretty simple otherwise we'd be using empty params field and that would error. For the future, I created issue #671 where we shouldn't even need to pass in params into run and this works implicitly

See #612 for example on how to test (will do this tomorrow, just tired now)
rossdanlm pushed a commit that referenced this issue Jan 2, 2024
…eck for undefined prompt_name

TSIA, pretty simple otherwise we'd be using empty params field and that would error. For the future, I created issue #671 where we shouldn't even need to pass in params into run and this works implicitly

See #612 for example on how to test (will do this tomorrow, just tired now)
rossdanlm pushed a commit that referenced this issue Jan 2, 2024
…eck for undefined prompt_name

TSIA, pretty simple otherwise we'd be using empty params field and that would error. For the future, I created issue #671 where we shouldn't even need to pass in params into run and this works implicitly

## Test Plan
Follow dev README to setup the local editor: https://github.com/lastmile-ai/aiconfig/tree/main/python/src/aiconfig/editor#dev, then run this command
```
curl http://localhost:8080/api/run -d '{"prompt_name":"get_activities"}' -X POST -H 'Content-Type: application/json'
```

Without params

With params

See #612 for example on how to test (will do this tomorrow, just tired now)
rossdanlm pushed a commit that referenced this issue Jan 2, 2024
…eck for undefined prompt_name

TSIA, pretty simple otherwise we'd be using empty params field and that would error. For the future, I created issue #671 where we shouldn't even need to pass in params into run and this works implicitly

## Test Plan
Follow dev README to setup the local editor: https://github.com/lastmile-ai/aiconfig/tree/main/python/src/aiconfig/editor#dev, then run this command
```
curl http://localhost:8080/api/run -d '{"prompt_name":"get_activities"}' -X POST -H 'Content-Type: application/json'
```

Without params

https://github.com/lastmile-ai/aiconfig/assets/151060367/7233a4db-9042-4fa9-affb-0f854ae8a50e


With params

https://github.com/lastmile-ai/aiconfig/assets/151060367/6c078804-ea66-4358-824d-21d0fe26bafa
rossdanlm added a commit that referenced this issue Jan 2, 2024
…eck for undefined prompt_name (#613)

[editor][server endpoints][2/n]: Add params arg to run command and check
for undefined prompt_name



TSIA, pretty simple otherwise we'd be using empty params field and that
would error. For the future, I created issue
#671 where we shouldn't
even need to pass in params into run and this works implicitly

## Test Plan
Follow dev README to setup the local editor:
https://github.com/lastmile-ai/aiconfig/tree/main/python/src/aiconfig/editor#dev,
then run this command
```
curl http://localhost:8080/api/run -d '{"prompt_name":"get_activities"}' -X POST -H 'Content-Type: application/json'
```

Without params


https://github.com/lastmile-ai/aiconfig/assets/151060367/7233a4db-9042-4fa9-affb-0f854ae8a50e


With params


https://github.com/lastmile-ai/aiconfig/assets/151060367/6c078804-ea66-4358-824d-21d0fe26bafa
@rossdanlm
Copy link
Contributor Author

I'm removing this becuase I realize now you'd like to have the use case where you can override the params dynamically from your application code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant