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: Tool call names #678

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix: Tool call names #678

wants to merge 1 commit into from

Conversation

csansoon
Copy link
Contributor

Vercel does not eat the tools configuration right away, and instead requires an additional transformation. Within this transformation, we were not maintaining the tool name

SCR-20241129-nhaq

Now, the name is maintained:

SCR-20241129-ngua

@geclos
Copy link
Collaborator

geclos commented Nov 30, 2024

this is because you've represented the tool calls as an array of tools, if you pass an object it works perfectly, i wouldn't apply custom transformations if not needed, just document the right way of declaring tools:

provider: Real openai
model: gpt-4o-mini
tools:
  weather:
    description: Gets the weather for particular location
    parameters:
      type: object
      properties:
        location:
          type: string
          description: Location to get the weather for
      required:
        - location
      additionalProperties: false

@csansoon
Copy link
Contributor Author

csansoon commented Dec 2, 2024

this is because you've represented the tool calls as an array of tools, if you pass an object it works perfectly, i wouldn't apply custom transformations if not needed, just document the right way of declaring tools:

provider: Real openai
model: gpt-4o-mini
tools:
  weather:
    description: Gets the weather for particular location
    parameters:
      type: object
      properties:
        location:
          type: string
          description: Location to get the weather for
      required:
        - location
      additionalProperties: false

@geclos Hmm but that differs from the OpenAI's API documentation. I guess we could just document our way to do it though

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.

2 participants