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

create_tool_def requires OpenAI key #118

Open
jcheng5 opened this issue Oct 12, 2024 · 4 comments
Open

create_tool_def requires OpenAI key #118

jcheng5 opened this issue Oct 12, 2024 · 4 comments

Comments

@jcheng5
Copy link
Collaborator

jcheng5 commented Oct 12, 2024

Either we should document this limitation, or make it possible to use other providers.

@hadley
Copy link
Member

hadley commented Oct 16, 2024

I briefly explored making this generic across providers but it was a bit harder than I thought. We might need to make #112 work and add some way to reset turns so that the user could provide any existing chat instance and create_tool_def() would clone and reset it.

@jcheng5
Copy link
Collaborator Author

jcheng5 commented Oct 16, 2024

One more option, we could deploy a public Shiny app that lets you paste in a function and you get the ToolDef.

@hadley
Copy link
Member

hadley commented Oct 16, 2024

Or a plumber API

@vorpalvorpal
Copy link

Maybe I'm misunderstanding the issue, but I made an identical function that replaced the call to chat_openai with chat_claude. Couldn't there simply be another parameter that allows the user to select the chat function? If you wanted to get fancy you could have some sort of dictionary that looked up the appropriate chat function based on the model provided. Possibly there could be some environment variable that sets the default chat function and possibly also the default model, and then this and other functions in elmer could read that.

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

No branches or pull requests

3 participants