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

genai: design for automatic function calling #75

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Commits on Mar 25, 2024

  1. genai: design for automatic function calling

    This PR is a suggested design for automatic function calling in Go.
    There is no implementation yet.
    
    - Add a Function field to FunctionDeclaration. Populating this
      field enables the function to be automatically called. If you
      set the field manually, you must set schema manually as well.
    
    - Add NewCallableFunctionDeclaration. This takes a function and
      both infers its schema and populates the entire FunctionDefinition.
    
    This design supports three use cases:
    
    1. Manual function calling: set schema but not function.
    2. Auto function calling, user schema: set schema and function.
    3. Auto function calling, inferred schema: call NewCallableFunctionDeclaration
    
    But it doesn't support:
    
    4. Manual function calling, inferred schema
    
    except in the roundabout way of using NewCallableFunctionDeclaration
    and then setting the Function field to nil.
    jba committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    96ee54a View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. added doc

    jba committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    e70f479 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. renamed files

    jba committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    e037c41 View commit details
    Browse the repository at this point in the history