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

Function calling format #49

Open
ghost opened this issue Oct 17, 2024 · 4 comments
Open

Function calling format #49

ghost opened this issue Oct 17, 2024 · 4 comments
Labels
invalid This doesn't seem right

Comments

@ghost
Copy link

ghost commented Oct 17, 2024

i provided the following format to bolna, sometimes it works sometimes it doesn't, i am unable to get the real reason of why it might not be working initially i thought it might be google api key but i provided new one and the results were same .

api_tools: { tools: '[{"name":"check_availability","description":"Check availability in Google Calendar","parameters":{"type":"object","properties":{"startDateTime":{"type":"string","description":"ISO formatted start date and time"},"endDateTime":{"type":"string","description":"ISO formatted end date and time"},"timeZone":{"type":"string","description":"Time zone for the event"}},"required":["startDateTime","endDateTime","timeZone"]}},{"name":"create_event","description":"Create a new event in Google Calendar","parameters":{"type":"object","properties":{"summary":{"type":"string","description":"Title of the event"},"description":{"type":"string","description":"Details of the event"},"startDateTime":{"type":"string","description":"ISO formatted start date and time"},"endDateTime":{"type":"string","description":"ISO formatted end date and time"},"timeZone":{"type":"string","description":"Time zone for the event"},"location":{"type":"string","description":"Location of the event"}},"required":["summary","startDateTime","endDateTime","timeZone"]}},{"name":"transfer_call","description":"Transfer calls to human agent if user asks to transfer the call or if it\'s not in your instructions on how to deal with a certain question user is asking"}]', tools_params: { check_availability: { method: "GET", param: "{\"timeMin\":\"%(startDateTime)s\",\"timeMax\":\"%(endDateTime)s\",\"timeZone\":\"%(timeZone)s\"}", url: "https://www.googleapis.com/calendar/v3/calendars/primary/events", api_token:Bearer ${apiAccessToken}}, create_event: { method: "POST", param: "{\"summary\":\"%(summary)s\",\"description\":\"%(description)s\",\"start\":{\"dateTime\":\"%(startDateTime)s\",\"timeZone\":\"%(timeZone)s\"},\"end\":{\"dateTime\":\"%(endDateTime)s\",\"timeZone\":\"%(timeZone)s\"},\"location\":\"%(location)s\"}", url: "https://www.googleapis.com/calendar/v3/calendars/primary/events", api_token:Bearer ${apiAccessToken} }, transfer_call: { method: "POST", param: null, url: "https://webhook.site/c5dfe764-8888-4be5-a28c-8cfe4d54d475", api_token: null } }, }, },

@prateeksachan
Copy link
Member

Can you use the same API + params via postman? Can you ping me the cURL of a successful request?

@prateeksachan
Copy link
Member

can you also ping the docs for this API which you're trying?

@ghost
Copy link
Author

ghost commented Oct 18, 2024

yes i was able to do that with postman and curl, you can get the details of api here https://developers.google.com/calendar/api/v3/reference?apix=true

@prateeksachan
Copy link
Member

As previously asked, can you paste the curl? And the exact documentation page of the specific url?

@prateeksachan prateeksachan added the invalid This doesn't seem right label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant