Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Adding function calling to AnyscaleLLM #227

Merged
merged 11 commits into from
Jan 21, 2024

Conversation

kylehh
Copy link
Contributor

@kylehh kylehh commented Dec 14, 2023

Problem

  1. Enable function calling to Anyscale LLM
  2. Add default {'type'='array'} for FunctionArrayProperty

Solution

Describe the approach you took. Link to any relevant bugs, issues, docs, or other resources.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Describe specific steps for validating this change.

Copy link
Contributor

@igiloh-pinecone igiloh-pinecone left a comment

Choose a reason for hiding this comment

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

@kylehh All in all LGTM. Please see a few comments

@igiloh-pinecone igiloh-pinecone mentioned this pull request Dec 20, 2023
7 tasks
kylehh and others added 8 commits December 21, 2023 16:08
If an LLM doesn't support function calling - it will raise NotImplementedError, which will be caught by FunctionCallingQueryGenerator
Instead of duplicating the full test suite, we've changed all OpenAI-like models to run parameterized in test_openai.py
Copy link
Contributor

Choose a reason for hiding this comment

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

@kylehh we've changed the format of test_openai.py in a manner where it parameterizes all LLM classes that inherit from OpenAILLM (like AnyscaleLLM), and runs the same test cases for all of these classes.
This way - we don't need a dedicated test_anyscale.py file which simply duplicates the entire test cases

Copy link
Contributor

@igiloh-pinecone igiloh-pinecone left a comment

Choose a reason for hiding this comment

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

LGTM!

I've changed the testing scheme and made AnyscalseLLM another parameterized case in test_openai.py

@igiloh-pinecone igiloh-pinecone added this pull request to the merge queue Jan 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 18, 2024
@igiloh-pinecone igiloh-pinecone added this pull request to the merge queue Jan 21, 2024
Merged via the queue into pinecone-io:main with commit ec5d304 Jan 21, 2024
7 checks passed
@kylehh kylehh deleted the ae-functioncall branch January 22, 2024 17:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants