This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openai import OpenAI | |
import json | |
client = OpenAI(api_key="***************************") | |
SQL_MANAGER_PROMPT = """ | |
You are the best SQL expert in the world and I need your help. | |
I want you to execute the request I will make from human language to a syntactically correct SQL query for MySQL 5.7. | |
Below I will provide you with the description of the tables so that you can understand which fields are being talked about in the request and produce correct queries: | |
Table `events`: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(null === $dealSaved) | |
{ | |
$dealRepository->saveDeal($deal); | |
$apiCaller->setDeal($deal)->callFromGrab(); | |
$this->addImageCacher($deal->getImage(), $deal->getId(), $couponer->getKey()); | |
} | |
else | |
{ | |
if(!$dealSaved->isEqual($deal)) //There are some differences |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parameters: | |
geocoder.class: Geocoder\Geocoder | |
geocoder.provider.google.class: Geocoder\Provider\GoogleMapsProvider | |
geocoder.provider.openstreetmaps.class: Geocoder\Provider\OpenStreetMapsProvider | |
geocoder.adapter.curl.class: Geocoder\HttpAdapter\CurlHttpAdapter | |
services: | |
geocoder.adapter: | |
class: %geocoder.adapter.curl.class% | |
public: false |