-
Notifications
You must be signed in to change notification settings - Fork 237
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
Add deepseek r1 client for integration #327
Add deepseek r1 client for integration #327
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -42,6 +42,7 @@ class OptionalPackages(Enum): | |||
# model sdk | |||
GROQ = ("groq", "Please install groq with: pip install groq") | |||
OPENAI = ("openai", "Please install openai with: pip install openai") | |||
DEEPSEEK = ("openai", "Please install deepseek with: pip install openai") |
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.
delete this as users will be directed to install openai package
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 deleted this from the lazy_import.py file
@@ -0,0 +1,299 @@ | |||
import os |
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.
wait for the next version on not rewrite everything as they only use openai package
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 are instead inheriting the openai client after making some modifications!
78dee41
to
6306633
Compare
Train multi-node tasks including cycle multi-hop rag and trainable agent
6306633
to
4f5c6d6
Compare
pattern = f"{system_start_tag}(.*?){system_end_tag}{user_start_tag}(.*?){user_end_tag}" | ||
|
||
# new regex pattern to ignore special characters such as \n | ||
pattern = ( |
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.
The original regex expression was not able to parse correctly. I fixed the regex pattern using \s to ignore escape characters.
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.
pretty good!
@@ -0,0 +1,66 @@ | |||
from adalflow.components.model_client import DeepSeekClient | |||
from adalflow.core.types import ModelType |
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.
in the next version, would like to directly show users using Generator with DeepSeekClient. as the client is not end-user facing, but more of developer facing.
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.
Overall, its really great.
What does this PR do?
This PR integrates deepseekR1 client into Adalflow by calling their API. It supports sync_call and not async_call at the moment.
Before submitting