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

Added support for AzureAI client service #188

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

adityasugandhi
Copy link

@adityasugandhi adityasugandhi commented Aug 21, 2024

Added Support Azure AI, client serivce #92

Now you can use either OPEN_AI_KEY or you can use Azure identity service to directly authenticate to your end points using credentials

@hmehta92
Copy link

@adityasugandhi
It seems that line 183 to 200, is duplicate of 163 to 180. Also, token in line 178 didn't work for me. I used azure_ad_token_provider instead.

fixed azure_ad_token provider in AzureOpenAI
@adityasugandhi
Copy link
Author

adityasugandhi commented Aug 28, 2024

@hmehta92 I have fixed the azure_ad_token provider call, and line 163 to 180 serves for AzureOpenAI, where line 183 to 200 is for AsyncAzureOpenAI.

@chainyo
Copy link

chainyo commented Sep 6, 2024

Hi, what's the status of this PR? Do you need help @adityasugandhi for anything?

I would like to see this feature implemented asap along with AWS Bedrock as they could serve more companies as they usually go with cloud providers when the other part of the cloud is hosted there.

@adityasugandhi
Copy link
Author

@chainyo I am still waiting for the review from the repo owner. @liyin2015

Sure, I will start looking into AWS Bedrock

Copy link
Collaborator

@liyin2015 liyin2015 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(1) Please add azure as a optional package in lazy_import
(2) please add a test file in adalflow/tests
(3) add azure in the pyproject.toml as an extra package

@adityasugandhi

chat_completion_parser: Callable[[Completion], Any] = None,
input_type: Literal["text", "messages"] = "text",
):
r"""It is recommended to set the OPENAI_API_KEY environment variable instead of passing it as an argument.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it does not have it only api_key? why using openai_api_key?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liyin2015 I have made changes as mentioned in the comments

@adityasugandhi
Copy link
Author

@liyin2015 I have made changes

log_probs = []
for c in completion.choices:
content = c.logprobs.content
print(content)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adityasugandhi I think you forgot to remove print statement here on line 90.

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

Successfully merging this pull request may close these issues.

5 participants