Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
orhanerday authored Mar 8, 2023
1 parent 9050c0e commit b61e59b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,13 @@ $open_ai->setORG("org-IKN2E1nI3kFYU8ywaqgFRKqi");
$open_ai = new OpenAi($open_ai_key);
````

## Custom URL
## Base URL

You can specify Origin URL with `setCustomURL()` method;
You can specify Origin URL with `setBaseURL()` method;

````php
$open_ai_key = getenv('OPENAI_API_KEY');
$open_ai->setCustomURL("https://ai.example.com/");
$open_ai->setBaseURL("https://ai.example.com/");
$open_ai = new OpenAi($open_ai_key,$originURL);
````

Expand All @@ -262,6 +262,12 @@ You can use some proxy servers for your requests api;
$open_ai->setProxy("http://127.0.0.1:1086");
````

## Set header

```php
$open_ai->setHeader(["Connection"=>"keep-alive"]);
```

## Get cURL request info

> ### !!! WARNING:Your API key will expose if you add this method to your code, therefore remove the method before deployment. Be careful !
Expand Down

0 comments on commit b61e59b

Please sign in to comment.