Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dexor 1.1 #13

Merged
merged 50 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
69429a8
Added service selection step in ChatAssistant and created services co…
Jul 7, 2024
14524e1
Added service column to assistants and initial structure for AIConnec…
Jul 7, 2024
0483d3f
Updated AIConnector to dynamically use service configurations, and up…
Jul 7, 2024
8539274
Updated chatassistants.php to ask for service first and select model …
Jul 7, 2024
f468d64
Revert "Updated chatassistants.php to ask for service first and selec…
Jul 7, 2024
066dd7a
Updated createNewAssistant method in ChatAssistant to ask for service…
Jul 7, 2024
ad91df9
Refactored ChatAssistant to use Laravel config() helper for configura…
Jul 8, 2024
e66f801
feat: Integrate AI connectors & onboarding steps, update configs & de…
Jul 8, 2024
0f7a461
laravel pint styles
Jul 9, 2024
56ee6dd
Fix undefined array key models in ListModelsRequest createDtoFromResp…
Jul 9, 2024
637585b
Revert "Fix undefined array key models in ListModelsRequest createDto…
Jul 9, 2024
89ffa49
adds changes to the integration connectors
Jul 9, 2024
f3ffe1c
adds changes for the data transfer objects
Jul 10, 2024
d9bf43d
adds validation for the data objects
Jul 10, 2024
0343e21
Refactor ChatAssistant to support dynamic service connectors and requ…
Jul 10, 2024
1529260
Refactor and Enhance Chat Integration
Jul 10, 2024
3687b06
adds data object for requests
Jul 10, 2024
02d45ff
Add HtmlToTextTool to fetch HTML from URL and return plain text
Jul 10, 2024
8507be7
Add HtmlToTextTool to fetch HTML from URL and return plain text; Regi…
Jul 10, 2024
8ded8c7
remove html to text tool
Jul 10, 2024
bece405
remove html to text tool
Jul 10, 2024
78b322f
pint code style fixes
Jul 10, 2024
5977298
adds DTOs for the chat request
Jul 11, 2024
67ef4a9
Enhanced ChatRequest and ChatAssistant for better integration. Added …
Jul 11, 2024
3538acb
Removed the package.xml file
Jul 11, 2024
98279a9
improving DTO formats
Jul 11, 2024
d74a059
Claude API Integration
Jul 11, 2024
ca41084
Update ChatRequest in Claude integration
Jul 11, 2024
74eea4b
Optimize and improve ChatRequest classes for Claude, OpenAI, and Olla…
Jul 11, 2024
2959bbb
Claude AI Improvement on the code
Jul 11, 2024
05b54a0
Removes unused file
Jul 11, 2024
9ce52b0
composer update and removed unused files
Jul 11, 2024
d3003f0
composer update and removed unused files
Jul 11, 2024
0808358
New Build
Jul 12, 2024
9eaaf9a
Merge pull request #11 from bootstrapguru/feature/claude-service-inte…
vijaythecoder Jul 12, 2024
4f000c4
Adds slash commands, allows to run commands while in chat mode
Jul 12, 2024
ede435f
Merge pull request #14 from bootstrapguru/feature/slash-commands
vijaythecoder Jul 12, 2024
a67b789
Implement feature request and bug fixes
Jul 12, 2024
b5549f3
Merge pull request #15 from bootstrapguru/enhancement/onboarding-api-…
vijaythecoder Jul 12, 2024
06cd137
Add new assistant option to DroidCommand
Jul 12, 2024
169911d
fixes with the bug that ends the execution after creating new assistant
Jul 12, 2024
a0312a0
Merge pull request #16 from bootstrapguru/feature/add-new-assistant-o…
vijaythecoder Jul 12, 2024
66f31d5
adds new docs
Jul 13, 2024
2c8159a
updated docs with the new information
Jul 14, 2024
f726199
updated docs with the new information
Jul 14, 2024
31c461f
Merge pull request #17 from bootstrapguru/docs/add-updated-documation
vijaythecoder Jul 14, 2024
c1bac99
Add issue templates for feature requests, bug reports, and enhancemen…
Jul 14, 2024
641da01
Change Droid to Dexor in what-is-droid-dev.md
Jul 14, 2024
7efa59b
changes droid to dexor
Jul 14, 2024
8eba87d
Merge pull request #19 from bootstrapguru/droid-dexor
vijaythecoder Jul 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug Report
about: Create a report to help us improve the project
title: "[Bug Report]: [Title]"
labels: bug
assignees: ''

---

## Describe the Bug
<!-- A clear and concise description of what the bug is. -->

## To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected Behavior
<!-- A clear and concise description of what you expected to happen. -->

## Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->

## Desktop (please complete the following information):
- OS: [e.g. Windows, macOS, Linux]
- Terminal: [e.g. bash, zsh, cmd, powershell]
- Version [e.g. 0.1.2]

## Additional Context
<!-- Add any other context about the problem here. -->
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Enhancement Request
about: Suggest an improvement or optimization for this project
title: "[Enhancement]: [Title]"
labels: enhancement
assignees: ''

---

## Summary
<!-- Provide a summary of the enhancement you would like to see implemented. -->

## Current Behavior
<!-- Describe the current behavior that you think needs improvement. -->

## Desired Behavior
<!-- Describe the behavior or feature you would like to see. -->

## Suggested Solution
<!-- Suggest your solution or improvement. -->

## Additional Context
<!-- Provide any other context or screenshots related to the enhancement request here. -->
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature Request
about: Suggest a new feature or idea for this project
title: "[Feature Request]: [Title]"
labels: feature request
assignees: ''

---

## Summary
<!-- Provide a summary of the feature you would like to see implemented. -->

## Motivation
<!-- Why do you want this feature? What problem does it solve? Why is it important to have this feature? -->

## Detailed Description
<!-- Provide a detailed description of the feature. Include any benefits, goals, and expected outcomes. -->

## Alternatives
<!-- Are there any alternative solutions or features you've considered? If so, provide those details here. -->

## Additional Context
<!-- Provide any other context or screenshots about the feature request here. -->
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# 🤖 Droid
# 🤖 Dexor

Welcome to **Droid**, your trusty companion for automating and streamlining your development tasks. Droid is here to help you stay productive by automating repetitive tasks, identifying and fixing bugs, writing comprehensive test cases, and maintaining a consistent codebase. Checkout the [documentation](https://docs.droids.dev/) to get started!
Welcome to **Dexor**, your trusty companion for automating and streamlining your development tasks. Dexor is here to help you stay productive by automating repetitive tasks, identifying and fixing bugs, writing comprehensive test cases, and maintaining a consistent codebase. Checkout the [documentation](https://docs.dexors.dev/) to get started!

Checkout the youtube video [here](https://youtu.be/oLmbafcHCKg)

<p align="center">
<a href="https://packagist.org/packages/bootstrapguru/droid"><img src="https://img.shields.io/packagist/dt/bootstrapguru/droid.svg" alt="Total Downloads" /></a>
<a href="https://packagist.org/packages/bootstrapguru/droid"><img src="https://img.shields.io/packagist/v/bootstrapguru/droid.svg?label=stable" alt="Latest Stable Version" /></a>
<a href="https://packagist.org/packages/bootstrapguru/droid"><img src="https://img.shields.io/packagist/l/bootstrapguru/droid.svg" alt="License" /></a>
<a href="https://packagist.org/packages/bootstrapguru/dexor"><img src="https://img.shields.io/packagist/dt/bootstrapguru/dexor.svg" alt="Total Downloads" /></a>
<a href="https://packagist.org/packages/bootstrapguru/dexor"><img src="https://img.shields.io/packagist/v/bootstrapguru/dexor.svg?label=stable" alt="Latest Stable Version" /></a>
<a href="https://packagist.org/packages/bootstrapguru/dexor"><img src="https://img.shields.io/packagist/l/bootstrapguru/dexor.svg" alt="License" /></a>
</p>
<img src="https://raw.githubusercontent.com/bootstrapguru/droid.dev/main/resources/images/droid.webp">
<img src="https://raw.githubusercontent.com/bootstrapguru/dexor.dev/main/resources/images/dexor.webp">

## Documentation

For full documentation, getting started guides, and advanced usage, please visit [docs.droids.dev](https://docs.droids.dev/).
For full documentation, getting started guides, and advanced usage, please visit [docs.dexors.dev](https://docs.dexors.dev/).

## License

Droid is an open-source software licensed under the GPL v3 license.
Dexor is an open-source software licensed under the GPL v3 license.
30 changes: 20 additions & 10 deletions app/Commands/DroidCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
namespace App\Commands;

use App\Services\ChatAssistant;
use App\Tools\ExecuteCommand;
use App\Utils\OnBoardingSteps;
use Exception;
use Illuminate\Console\Command;

use function Termwind\ask;
use function Termwind\render;

class DroidCommand extends Command
class DexorCommand extends Command
{
public $signature = 'droid';
public $signature = 'dexor {--new : Create a new assistant}';

public $description = 'Allows you to create/update a feature';
public $description = 'Allows you to create/update a feature, run commands, and create a new assistant';

public function __construct(
private readonly ChatAssistant $chatAssistant,
private readonly ExecuteCommand $executeCommand
) {
parent::__construct();
}

/**
* @throws Exception
Expand All @@ -26,12 +33,11 @@ public function handle(): int
return self::FAILURE;
}

$chatAssistant = new ChatAssistant;
$thread = $chatAssistant->createThread();
if ($this->option('new')) {
$this->chatAssistant->createNewAssistant();
}

render(view('assistant', [
'answer' => 'How can I help you today?',
]));
$thread = $this->chatAssistant->createThread();

while (true) {
$message = ask('<span class="mt-1 mx-1">🍻:</span>');
Expand All @@ -40,7 +46,11 @@ public function handle(): int
break;
}

$chatAssistant->getAnswer($thread, $message);
if (str_starts_with($message, '/')) {
$this->executeCommand->handle(substr($message, 1));
} else {
$this->chatAssistant->getAnswer($thread, $message);
}
}

return self::SUCCESS;
Expand Down
12 changes: 12 additions & 0 deletions app/Data/AIModelData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace App\Data;

use Spatie\LaravelData\Data;

class AIModelData extends Data
{
public function __construct(
public string $name
) {}
}
18 changes: 18 additions & 0 deletions app/Data/MessageData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Data;

use Illuminate\Support\Collection;
use Spatie\LaravelData\Data;

class MessageData extends Data
{
public function __construct(
public string $role,
public ?string $content,
public ?string $tool_call_id,
public ?string $tool_name,
/** @var Collection<int, ToolCallData> */
public ?Collection $tool_calls
) {}
}
14 changes: 14 additions & 0 deletions app/Data/ToolCallData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace App\Data;

use Spatie\LaravelData\Data;

class ToolCallData extends Data
{
public function __construct(
public string $id,
public string $type,
public ToolFunctionData $function,
) {}
}
13 changes: 13 additions & 0 deletions app/Data/ToolFunctionData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Data;

use Spatie\LaravelData\Data;

class ToolFunctionData extends Data
{
public function __construct(
public string $name,
public string $arguments,
) {}
}
36 changes: 36 additions & 0 deletions app/Integrations/Claude/ClaudeAIConnector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace App\Integrations\Claude;

use Saloon\Http\Connector;
use Saloon\Traits\Plugins\AcceptsJson;
use Saloon\Traits\Plugins\AlwaysThrowOnErrors;
use Saloon\Traits\Plugins\HasTimeout;

class ClaudeAIConnector extends Connector
{
use AcceptsJson, AlwaysThrowOnErrors, HasTimeout;

protected int $connectTimeout = 60;

protected int $requestTimeout = 120;

/**
* The Base URL of the API
*/
public function resolveBaseUrl(): string
{
return 'https://api.anthropic.com/v1';
}

/**
* Default headers for every request
*/
protected function defaultHeaders(): array
{
return [
'x-api-key' => config('aiproviders.claude.api_key'),
'anthropic-version' => '2023-06-01',
];
}
}
Loading