ITADN
neuron-core/neuron-ai

版本发布 8

3.3.12
? · 2026-05-01

- Fix Typesense vector store - #552 - Fix OpenAI Responses message mapper - Fix #556 merging PR #559 by @iztok

3.3.4
? · 2026-04-09

Fix Mistral token usage reporting

3.3.1
? · 2026-04-07

- Fix error handler in case `MissingCallbackParameter` - Improve chat history trim for better performance

3.2.9
? · 2026-03-20

Track stop reason when streaming in Gemini - PR #516 by @joecharm

3.1.0
? · 2026-03-06

Tool approval callback receives an instance of tool: ```php new ToolApproval( tools: [ // Enable tool approval based on custom rules BuyTicketTool::class => function (ToolInterface $tool): bool { return $tool->getInput('amount') > 100; } ] ) ```

3.0.8
? · 2026-03-03

Fix http client baseUri Inspired by @ottoszika with PR #506

2.12.4
? · 2026-02-13

Fix #469 thanks to @manuelkiessling PR #470

2.12.0
? · 2026-02-08

## Introducing Testing Components When you test an agent, you don't want every test run to make real API calls to OpenAI, Anthropic, or any other provider. Real calls are slow, cost money, and return different results every time, making your tests flaky and expensive. The same applies to RAG agents: you don't want to spin up a vector database or call an embeddings API just to verify your agent's logic. This release introduces a set of "fake" components you can use to test the logic of your agentic system without the need to access real providers. `FakeAIProvider` replaces the AI provider, `FakeEmbeddingsProvider` replaces the embeddings provider, and `FakeVectorStore` replaces the vector store. They return predetermined responses, never hit the network, and record every interaction so you can assert exactly what your agent did. Here is an example of a test you can create to prove the consistency of your implementation: ```php use NeuronAI\Chat\Messages\ToolCallMessage; public function test_agent_uses_tools(): void { $searchTool = Tool::make('search', 'Search the web') ->addProperty(new ToolProperty('query', PropertyType::STRING, 'Search query', true)) ->setCallable(fn (string $query): string => "Results for: {$query}"); $provider = new FakeAIProvider( // First call: the model asks to use the search tool new ToolCallMessage(null, [ (clone $searchTool)->setCallId('call_1')->setInputs(['query' => 'PHP frameworks']), ]), // Second call: the model responds using the tool result new AssistantMessage('Here are the top PHP frameworks...') ); $agent = MyAgent::make() ->setAiProvider($provider) ->addTool($searchTool); $message = $agent->chat(new UserMessage('Best PHP frameworks?'))->getMessage(); $this->assertSame('Here are the top PHP frameworks...', $message->getContent()); $provider->assertCallCount(2); } ``` Check out the [**full documentation**](https://docs.neuron-ai.dev/resources/testing).