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

[fix] Azure function calling #123

Merged
merged 7 commits into from
Aug 27, 2024
Merged

Conversation

diogoazevedo15
Copy link
Contributor

Summary of Changes

  1. Re-enabled Function Calling for Azure OpenAI Models:

    • Added support for function calling in Azure OpenAI models, allowing for dynamic execution of functions based on the request parameters.
  2. Conditional Parameter Passing:

    • Implemented logic to ensure that tools and functions parameters are only passed when appropriate:
      • tools parameters are passed only when is_llama = False and has_tools = True.
      • functions parameters are passed only when is_llama = False and has_functions = True.
    • This prevents unnecessary or incorrect parameters from being sent when the model is not an Azure OpenAI model (e.g MistralAI)

1. Added function calling back to AzureOpenAI
Pass functions or tools only if the model is an AzureOpenAI model.
@diogoazevedo15 diogoazevedo15 changed the base branch from main to develop August 21, 2024 14:34
1. Break down the convert_openai_to_vertexai function into smaller methods.
2. Add type annotations to the parameters of these new functions.
3. Write docstrings for each of these new functions.
1. Resolved compatibility issue between Azure Llama models and Langchain Pandas Agent.
2. Implemented type annotations for all functions in the Azure Provider.
3. Changed "handle_tool_response" to "handle_function_response" for clarity.
4. Added descriptive docstring to "handle_function_response" function.
Copy link
Collaborator

Choose a reason for hiding this comment

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

somthing looks wrong with this file.

@claudiolemos claudiolemos merged commit 57b9223 into develop Aug 27, 2024
@claudiolemos claudiolemos deleted the fix/azure-function-calling branch August 27, 2024 11:18
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.

3 participants