prerun.py 382 B

12345678910
  1. import logging
  2. import openai
  3. logging.basicConfig(level=logging.INFO, format='%(levelname)s - %(message)s')
  4. # Use this client to run examples.
  5. # If you have enabled authentication management, please set the 'api_key'. Otherwise, you can ignore this parameter.
  6. base_url = "http://localhost:8086/api/v1"
  7. api_key = "ml-xxx"
  8. client = openai.OpenAI(base_url=base_url, api_key=api_key)