Skip to content

Commit 6d56f66

Browse files
authored
docs: openrouter links are updated in readme
1 parent 38365fd commit 6d56f66

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<img src="https://reboosty-reboosty.vercel.app/api?repo_url=https://github.com/moe-mizrak/laravel-openrouter" alt="reboosty" />
1111
</a>
1212

13-
This Laravel package provides an easy-to-use interface for integrating **[OpenRouter](https://openrouter.ai/)** into your Laravel applications. **OpenRouter** is a unified interface for Large Language Models (LLMs) that allows you to interact with various **[AI models](https://openrouter.ai/docs#models)** through a single API.
13+
This Laravel package provides an easy-to-use interface for integrating **[OpenRouter](https://openrouter.ai/)** into your Laravel applications. **OpenRouter** is a unified interface for Large Language Models (LLMs) that allows you to interact with various **[AI models](https://openrouter.ai/models)** through a single API.
1414

1515
## Table of Contents
1616

@@ -87,7 +87,7 @@ OPENROUTER_API_REFERER=
8787
> [!NOTE]
8888
>
8989
> - `OPENROUTER_API_ENDPOINT`: The endpoint URL for the **OpenRouter API** (default: https://openrouter.ai/api/v1/).
90-
> - `OPENROUTER_API_KEY`: Your **API key** for accessing the OpenRouter API. You can obtain this key from the [OpenRouter dashboard](https://openrouter.ai/keys).
90+
> - `OPENROUTER_API_KEY`: Your **API key** for accessing the OpenRouter API. You can obtain this key from the [OpenRouter dashboard](https://openrouter.ai/settings/keys).
9191
> - `OPENROUTER_API_TIMEOUT`: Request timeout in seconds. Increase value to 120 - 180 if you use long-thinking models like openai/o1 (default: 20)
9292
> - `OPENROUTER_API_TITLE`: Optional - Site URL for rankings on openrouter.ai
9393
> - `OPENROUTER_API_REFERER`: Optional - Site referer for rankings on openrouter.ai
@@ -116,7 +116,7 @@ The [`ChatData`](src/DTO/ChatData.php) class is used to **encapsulate the data**
116116

117117
#### LLM Parameters
118118

119-
These properties control various aspects of the generated response (more [info](https://openrouter.ai/docs#parameters)):
119+
These properties control various aspects of the generated response (more [info](https://openrouter.ai/docs/api-reference/parameters)):
120120

121121
- **max_tokens** (int|null): The maximum number of tokens that can be generated in the completion. Default is 1024.
122122
- **temperature** (float|null): A value between 0 and 2 controlling the randomness of the output.
@@ -212,7 +212,7 @@ To send a chat request, create an instance of [`ChatData`](src/DTO/ChatData.php)
212212

213213
```php
214214
$content = 'Tell me a story about a rogue AI that falls in love with its creator.'; // Your desired prompt or content
215-
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/docs#models)
215+
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/models)
216216
$messageData = new MessageData(
217217
content: $content,
218218
role: RoleType::USER,
@@ -235,7 +235,7 @@ $chatResponse = LaravelOpenRouter::chatRequest($chatData);
235235

236236
```php
237237
$content = 'Tell me a story about a rogue AI that falls in love with its creator.'; // Your desired prompt or content
238-
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/docs#models)
238+
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/models)
239239
$messageData = new MessageData(
240240
content: $content,
241241
role: RoleType::USER,
@@ -452,7 +452,7 @@ $content = Arr::get($response->choices[0], 'message.content');
452452

453453
- #### Structured Output
454454

455-
(Please also refer to [OpenRouter Document Structured Output](https://openrouter.ai/docs/structured-outputs) for models supporting structured output, also for more details)
455+
(Please also refer to [OpenRouter Document Structured Output](https://openrouter.ai/docs/features/structured-outputs) for models supporting structured output, also for more details)
456456

457457
If you want to receive the response in a structured format, you can specify the `type` property for `response_format` ([ResponseFormatData](src/DTO/ResponseFormatData.php)) as `json_object` in the [`ChatData`](src/DTO/ChatData.php) object.
458458

@@ -538,7 +538,7 @@ To retrieve the cost of a generation, first make a `chat request` and obtain the
538538

539539
```php
540540
$content = 'Tell me a story about a rogue AI that falls in love with its creator.'; // Your desired prompt or content
541-
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/docs#models)
541+
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/models)
542542
$messageData = new MessageData(
543543
content: $content,
544544
role : RoleType::USER,
@@ -580,7 +580,7 @@ Similarly, to send a chat request, create an instance of [`ChatData`](src/DTO/Ch
580580

581581
```php
582582
$content = 'Tell me a story about a rogue AI that falls in love with its creator.'; // Your desired prompt or content
583-
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/docs#models)
583+
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/models)
584584
$messageData = new MessageData(
585585
content: $content,
586586
role : RoleType::USER,
@@ -603,7 +603,7 @@ Similarly, to retrieve the cost of a generation, create a `chat request` to obta
603603

604604
```php
605605
$content = 'Tell me a story about a rogue AI that falls in love with its creator.';
606-
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/docs#models)
606+
$model = 'mistralai/mistral-7b-instruct:free'; // The OpenRouter model you want to use (https://openrouter.ai/models)
607607
$messageData = new MessageData(
608608
content: $content,
609609
role : RoleType::USER,

0 commit comments

Comments
 (0)