Skip to content

Commit

Permalink
add new package mistral and ollama, add postfix adapter to packages o…
Browse files Browse the repository at this point in the history
…llama and openai (#4)
  • Loading branch information
wachterjohannes authored Jan 6, 2024
0 parents commit dce0058
Show file tree
Hide file tree
Showing 11 changed files with 3,210 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.gitattributes export-ignore
.gitignore export-ignore
composer.lock export-ignore
/tests export-ignore
phpunit.xml.dist export-ignore
.php-cs-fixer.dist.php export-ignore
phpstan.neon export-ignore
rector.php export-ignore
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/vendor/
/composer.phar
/phpunit.xml
/.phpunit.cache
/tests/var
/docker-compose.override.yml
/.php-cs-fixer.php
/.php-cs-fixer.cache
14 changes: 14 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

$phpCsConfig = require(dirname(__DIR__, 2) . '/.php-cs-fixer.dist.php');

$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->ignoreVCSIgnored(true);

$phpCsConfig->setFinder($finder);

return $phpCsConfig->setFinder($finder);

22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2023 Johannes Wachter

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

81 changes: 81 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"name": "modelflow-ai/openai-adapter",
"description": "Integrates the openai ecosystem into modelflow-ai.",
"type": "library",
"license": "MIT",
"keywords": [
"ai",
"openai",
"gpt4",
"gpt3.5"
],
"autoload": {
"psr-4": {
"ModelflowAi\\OpenaiAdapter\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ModelflowAi\\OpenaiAdapter\\Tests\\": "tests/"
}
},
"authors": [
{
"name": "Johannes Wachter",
"email": "[email protected]"
}
],
"require": {
"php": "^8.2",
"modelflow-ai/core": "^0.1",
"openai-php/client": "dev-main",
"symfony/http-client": "7.1.x-dev",
"nyholm/psr7": "^1.8@dev"
},
"require-dev": {
"php-cs-fixer/shim": "^3.15",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^10.3",
"rector/rector": "^0.18.1"
},
"scripts": {
"test": [
"Composer\\Config::disableProcessTimeout",
"vendor/bin/phpunit"
],
"phpstan": "@php vendor/bin/phpstan analyze",
"lint-rector": "@php vendor/bin/rector process --dry-run",
"lint-php-cs": "@php vendor/bin/php-cs-fixer fix --verbose --diff --dry-run",
"lint": [
"@phpstan",
"@lint-php-cs",
"@lint-rector",
"@lint-composer"
],
"lint-composer": "@composer validate --strict",
"rector": "@php vendor/bin/rector process",
"php-cs-fix": "@php vendor/bin/php-cs-fixer fix",
"fix": [
"@rector",
"@php-cs-fix"
]
},
"repositories": [
{
"type": "path",
"url": "./../*",
"options": {
"symlink": true
}
}
],
"minimum-stability": "dev",
"config": {
"allow-plugins": {
"phpstan/extension-installer": true,
"php-http/discovery": true
}
}
}
Loading

0 comments on commit dce0058

Please sign in to comment.