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

consider making provider field public #202

Open
simonpcouch opened this issue Dec 6, 2024 · 1 comment
Open

consider making provider field public #202

simonpcouch opened this issue Dec 6, 2024 · 1 comment

Comments

@simonpcouch
Copy link
Contributor

I'm currently working on a package that involves iteration across various elmer Chats provided by the user. Having access to only the Chat object, I'm finding it a bit difficult to extract information about the model/provider to summarize "what model is behind this Chat" without accessing private fields. Would you consider making the provider field public or providing a public method to summarize components of it?

My current approach subsets into that provider and pastes together metadata that seems relevant via a str.Chat method:

library(evalthat)
library(elmer)

str(chat_claude())
#> [1] "Claude claude-3-5-sonnet-latest"
str(chat_openai())
#> Using model = "gpt-4o".
#> [1] "OpenAI gpt-4o"
str(chat_openai(model = "gpt-4o-mini"))
#> [1] "OpenAI gpt-4o-mini"
str(chat_openai(model = "gpt-4o-mini", api_args = list(temperature = 1)))
#> [1] "OpenAI gpt-4o-mini (temperature: 1)"

Created on 2024-12-06 with reprex v2.1.1

@hadley
Copy link
Member

hadley commented Dec 6, 2024

Seems reasonable to me. I'll also need to think a bit about how we name providers + models in order to implement #203.

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

2 participants