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

Enable a GenAIScript to be packaged as a JavaScript/TypeScript function #450

Open
bzorn opened this issue May 14, 2024 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@bzorn
Copy link
Collaborator

bzorn commented May 14, 2024

Currently input and output of GenAIScript is via creating files, etc. We could support the ability to have a wrapper for a script that would use a TypeScript signature to define the inputs and outputs and allow the script to be called as a normal function within other JavaScript/TypeScript code.

@bzorn bzorn added the enhancement New feature or request label May 14, 2024
@tballmsft
Copy link
Collaborator

basically, I want an in-memory way to call genaiscript. I want to supply a function type signature to genai that tells it the input types (rather than input files) and output type (rather than a file/files). I also supply a "function body" that uses genaiscript to implement the body, referring to the typed input params. genaiscript provides all the plumbing to convert from (typed) input values into prompt, and back out again.

Not clear what this actually looks like in code, yet.

@pelikhan
Copy link
Member

pelikhan commented May 14, 2024 via email

@pelikhan
Copy link
Member

Note that scripts can have typed parameters so we already have parts of what you want.

https://microsoft.github.io/genaiscript/reference/scripts/variables/#script-parameters

@pelikhan
Copy link
Member

one solution would be to drop a .ts file (or .py) that wraps a call to the CLI using the parameters and returning the full output. might be overkill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants