Skip to content

Instantly share code, notes, and snippets.

@mif-git
mif-git / functioncalling.py
Last active December 8, 2023 04:45
ChatGPT function calling sample with Product search API
import openai
import random
import json
openai.api_key = "YOUR_OPEN_API_KEY"
def search_printer_products(model_name=None, manufacturer=None, release_date_from=None, release_date_to=None,
price_min=None, price_max=None, paper_size=None, color_printing=None,
tray_capacity_min=None, tray_capacity_max=None, ink_cost_min=None, ink_cost_max=None,
width_min=None, width_max=None, depth_min=None, depth_max=None,