-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
declare required environment keys #662
Comments
I like the idea of declaratively exposing any required environment keys. Keep in mind that most of these classes need to be constructed and verify their keys before being used as AI functions. import { WeatherClient } from '@agentic/weather'
const weather = new WeatherClient() // this is where the env var is currently checked
defTool(weather.functions.get('get_current_weather'))
$`What is the weather in SF?` Happy to expose env vars to the function spec or What about adding something like an abstract static method to AIFunctionProvider which would declaratively expose any env var required to instantiate that class? |
Related to my example code above, I believe it could be useful to either add an adaptor to Agentic for GenAIScript to support Agentic's notion of What you have as I understand it as examples for GenAIScript's Happy to discuss the best way to support these and interop with GenAIScript as cleanly as possible. |
Ha, I shall fix that. |
Static field sound good. I could recover it from the instance constructor. |
I've updated support for the AIProvider types (tested on the weather tool) --> https://microsoft.github.io/genaiscript/guides/agentic-tools/#weather-example |
Since most tools require some environment variables, it would be nice to add some kind of "env: string[]" entry to the function spec so that we can do a friendly check ahead of execution.
The text was updated successfully, but these errors were encountered: