-
Notifications
You must be signed in to change notification settings - Fork 13
feat(llm): add integration for Claude #171
base: main
Are you sure you want to change the base?
Conversation
For reference, this is a follow-up PR of #169 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reworking the PR! There are still a few things to handle. For that to be easier for you, I suggest you locally install the anthropic library and check the model information and how it can be verified :)
Let me know if you have any questions!
# {datetime.fromtimestamp(model_card.created).isoformat()})", | ||
) | ||
|
||
def _validate_model(self) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it as a static method (with the corresponding arg, like in groq/openai integration)
self._validate_model() | ||
|
||
self.temperature = temperature | ||
# model_card = BaseModel.retrieve(model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to verify whether the model selection is available
# model_card = BaseModel.retrieve(model) | ||
logger.info( | ||
f"Using Claude w/ {self.model} (created at " | ||
# {datetime.fromtimestamp(model_card.created).isoformat()})", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the information is available, it would be worth displaying it :) I was only saying earlier that I'm not sure the attribute is named the same way than groq or openai
|
||
def _validate_model(self) -> None: | ||
input_dict = {"model_type": self.model} | ||
validation_result = BaseModel.model_validate(input_dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a confusion here: we want to validate the LLM name reference in the API (=model name), not the Pydantic schema model
Ok noted 👍. |
What does this PR do?
Added integration for Claude!
There's just one problem and that is i am not able to find model_card for claude in the docs as result i have commented that part.
Before submitting
documentation guidelines.