Skip to content

Commit 8ec61e1

Browse files
committed
tweaks
1 parent 05abf54 commit 8ec61e1

File tree

7 files changed

+57
-17
lines changed

7 files changed

+57
-17
lines changed

config/cortex.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@
5959
],
6060

6161
'ollama' => [
62-
'driver' => LLMDriver::OpenAIChat,
63-
// 'driver' => LLMDriver::Anthropic,
62+
'driver' => LLMDriver::OpenAIResponses,
6463
'options' => [
6564
'api_key' => 'ollama',
6665
'base_uri' => env('OLLAMA_BASE_URI', 'http://localhost:11434/v1'),
@@ -79,7 +78,7 @@
7978
'api_key' => 'lmstudio',
8079
'base_uri' => env('LMSTUDIO_BASE_URI', 'http://localhost:1234/v1'),
8180
],
82-
'default_model' => 'openai/gpt-oss-20b',
81+
'default_model' => 'qwen3.5-9b-mlx',
8382
'default_parameters' => [
8483
'temperature' => null,
8584
'max_tokens' => 1024,

resources/js/components/app-sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const footerNavItems: NavItem[] = [
3737
},
3838
{
3939
title: "Documentation",
40-
href: "https://docs.cortexphp.com",
40+
href: "https://docs.cortexphp.com/cortex",
4141
icon: BookOpen,
4242
},
4343
];

src/AGUI/Enums/EventType.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,25 @@ enum EventType: string
4949
case ToolCallResult = 'TOOL_CALL_RESULT';
5050

5151
/** Marks the start of reasoning. */
52-
case ReasoningStart = 'THINKING_START';
52+
case ReasoningStart = 'REASONING_START';
5353

5454
/** Marks the end of reasoning. */
55-
case ReasoningEnd = 'THINKING_END';
55+
case ReasoningEnd = 'REASONING_END';
5656

5757
/** Signals the start of a reasoning message. */
58-
case ReasoningMessageStart = 'THINKING_TEXT_MESSAGE_START';
58+
case ReasoningMessageStart = 'REASONING_MESSAGE_START';
5959

6060
/** Represents a chunk of content in a streaming reasoning message. */
61-
case ReasoningMessageContent = 'THINKING_TEXT_MESSAGE_CONTENT';
61+
case ReasoningMessageContent = 'REASONING_MESSAGE_CONTENT';
6262

6363
/** Signals the end of a reasoning message. */
64-
case ReasoningMessageEnd = 'THINKING_TEXT_MESSAGE_END';
64+
case ReasoningMessageEnd = 'REASONING_MESSAGE_END';
6565

6666
/** A convenience event to auto start/close reasoning messages. */
67-
case ReasoningMessageChunk = 'THINKING_TEXT_MESSAGE_CHUNK';
67+
case ReasoningMessageChunk = 'REASONING_MESSAGE_CHUNK';
68+
69+
/** Attaches encrypted chain-of-thought reasoning to a message or tool call. */
70+
case ReasoningEncryptedValue = 'REASONING_ENCRYPTED_VALUE';
6871

6972
/** Provides a complete snapshot of an agent’s state. */
7073
case StateSnapshot = 'STATE_SNAPSHOT';
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Cortex\AGUI\Events;
6+
7+
use Cortex\AGUI\Enums\EventType;
8+
use Illuminate\Contracts\Support\Arrayable;
9+
10+
/**
11+
* @implements Arrayable<string, mixed>
12+
*/
13+
final class ReasoningEncryptedValue extends AbstractEvent implements Arrayable
14+
{
15+
public EventType $type = EventType::ReasoningEncryptedValue;
16+
17+
/**
18+
* @param 'message'|'tool-call' $subtype
19+
*/
20+
public function __construct(
21+
public string $subtype = 'message',
22+
public string $entityId = '',
23+
public string $encryptedValue = '',
24+
) {}
25+
26+
/**
27+
* @return array<string, mixed>
28+
*/
29+
public function toArray(): array
30+
{
31+
return $this->buildArray([
32+
'subtype' => $this->subtype,
33+
'entityId' => $this->entityId,
34+
'encryptedValue' => $this->encryptedValue,
35+
]);
36+
}
37+
}

src/Agents/Prebuilt/WeatherAgent.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public function prompt(): ChatPromptTemplate|ChatPromptBuilder|string
5555

5656
public function llm(): LLM|string|null
5757
{
58-
return Cortex::llm('lmstudio', 'openai/gpt-oss-20b')->ignoreFeatures();
58+
return Cortex::llm('ollama', 'qwen3.5:9b')->ignoreFeatures();
59+
// return Cortex::llm('lmstudio/qwen3.5-9b-mlx')->ignoreFeatures();
5960
// return Cortex::llm('anthropic', 'claude-haiku-4-5')->ignoreFeatures();
6061
// return Cortex::llm('openai', 'gpt-5-mini')->ignoreFeatures();
6162
}

tests/fixtures/skills/cortex-docs/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
name: Cortex
3-
description: Documentation and capabilities reference for Cortex
2+
name: Cortex JSON Schema
3+
description: Documentation and capabilities reference for Cortex JSON Schema PHP package.
44
---
55

66
## Capabilities

workbench/app/Providers/CortexServiceProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function boot(): void
132132
name: 'Generic Assistant',
133133
description: 'A helpful assistant that can answer questions.',
134134
prompt: 'You are a helpful assistant.',
135-
llm: 'lmstudio/openai/gpt-oss-20b',
135+
llm: 'lmstudio/qwen3.5-9b-mlx',
136136
// llm: 'ollama/gpt-oss:20b',
137137
tools: [
138138
// $translationAgent->asTool('translate', 'Translate text from one language to another.'),
@@ -168,8 +168,8 @@ public function boot(): void
168168
description: 'A helpful assistant that can think and reason about the user\'s question.',
169169
prompt: 'You are a helpful assistant.',
170170
// llm: Cortex::llm('anthropic/claude-3-7-sonnet-20250219')
171-
llm: Cortex::llm('lmstudio/openai/gpt-oss-20b')
172-
// llm: Cortex::llm('ollama/gpt-oss:20b')
171+
// llm: Cortex::llm('lmstudio/qwen3.5-9b-mlx')
172+
llm: Cortex::llm('ollama/qwen3.5:9b')
173173
->withMaxTokens(2048)
174174
->withParameters([
175175
'thinking' => [
@@ -200,7 +200,7 @@ public function boot(): void
200200
$skillsAgent = new SkillsAgent()
201201
->withSkillsDirectory(package_path('tests/fixtures/skills'))
202202
// ->withLLM(Cortex::llm('anthropic/claude-haiku-4-5')->ignoreFeatures())
203-
->withLLM(Cortex::llm('ollama/glm-4.6:cloud')->ignoreFeatures())
203+
->withLLM(Cortex::llm('ollama/qwen3.5:9b')->ignoreFeatures())
204204
->build();
205205

206206
Cortex::registerAgent($skillsAgent);

0 commit comments

Comments
 (0)