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

CreateAssistantDto missing forwardingPhoneNumber field specified on docs #6

Open
jeffreyyun opened this issue Jan 13, 2025 · 0 comments

Comments

@jeffreyyun
Copy link

https://docs.vapi.ai/assistants/function-calling#transfer-call says

image

Yet forwardingPhoneNumber is not supported when creating an assistant.

image

Minimal code example (to replicate syntax error and for manual testing):

import { VapiClient } from "@vapi-ai/server-sdk";

const API_TOKEN = "";
const HUMAN_AGENT_NUMBER = "";

async function main() {
  const client = new VapiClient({
    token: API_TOKEN,
  });

  await client.assistants.create({
    name: "test transferCall tool", 
    model: {
      provider: "openai",
      model: "gpt-4o-mini",
      messages: [
        {
          role: "system",
          content: "hi"
        }
      ],
      // tools: [
      //   {
      //     type: "transferCall", 
      //     destinations: [
      //       {
      //         type: "number",
      //         number: HUMAN_AGENT_NUMBER
      //       }
      //     ]
      //   }
      // ]
    },
    forwardingPhoneNumber: HUMAN_AGENT_NUMBER,
    firstMessage: "hi",
  });
}
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

No branches or pull requests

1 participant