Skip to content

Commit

Permalink
Merge pull request #15 from moe-mizrak/dev
Browse files Browse the repository at this point in the history
new line typo fixed in readme
  • Loading branch information
moe-mizrak authored Jun 27, 2024
2 parents 56525d7 + 390cde3 commit b26c163
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ OPENROUTER_DEFAULT_MODEL=default_model
## ⚡ Quick Usage Guide
This package is designed to be **flexible**, but for an **easy quick start**, follow the steps below:
- Create a file named `functions.yml` under a directory of your choice. Modify config file accordingly for `functions_yml_path`.
<br/>
(Check [Generate Function List](#generate-function-list) for further details).
```php
'functions_yml_path' => __DIR__ . '/../resources/functions.yml', // functions.yml is located under resources folder in this example.
Expand Down Expand Up @@ -192,7 +191,6 @@ LaravelPromptAlchemist::generateFunctionList($class, $functions, $fileName);
```

- Create yml file for **function payload schema** and modify `function_payload_schema_path` in **config** accordingly.
<br/>
(Check [Function Payload Schema](#function-payload-schema) for further details).
<br/>

Expand Down Expand Up @@ -241,7 +239,6 @@ $response = LaravelOpenRouter::chatRequest($chatData);
```

- **Validate** the response retrieved from **OpenRouter**.
<br/>
(Check [Validate Function Signature](#validate-function-signature) for further details).
<br/>

Expand Down Expand Up @@ -272,7 +269,6 @@ $isValid = LaravelOpenRouter::validateFunctionSignature($llmReturnedFunctionData
```

- And finally, call **functions returned from the LLM** which are necessary for answering the **prompt** (Since **function signature** is **validated**, it is now **safe** to call **LLM returned functions**).
<br/>
(Check [Call Function (Actual Function Call)](#call-function-actual-function-call) for further details).
<br/>

Expand Down Expand Up @@ -329,7 +325,6 @@ FunctionResultData([
Where `function_name` is the **name of the function called** as the name suggested, and `result` is the **function call result** can be anything (void, array, object, bool etc. whatever your function returns to.)

- Optionally, you can also send **function results** to LLM so that regarding `function_results_schema`, it will return the answer.
<br/>
(Check [Prepare Function Results Payload](#prepare-function-results-payload) for further details)
```php
$prompt = 'Can tell me Mr. Boolean Bob credit score?';
Expand Down

0 comments on commit b26c163

Please sign in to comment.