Git Product home page Git Product logo

larachain's Introduction

LaraChain

Reading over LangChain

LaraChain.io

And just thinking how to make some of those flows work in a Laravel environment

LaraChain Full Demo

Links

The PHP Vector library

https://github.com/pgvector/pgvector-php

Setup

Make sure to have .env in place before running sail up

Follow the Sail Laravel docs eg sail up for Postgres only the rest is just normal Laravel. The brew install did not work on my M2

Seed the user:

Update your .env file:

ADMIN_EMAIL=[email protected]
ADMIN_PASSWORD=foobaz

This just helps since Jetstream requires a team etc to work.

php artisan migrate
php artisan db:seed --class=UserSeeder

Migration Note

$table->integer('token_count');
$table->vector('embedding', 1536)->nullable(); 

More Logging

php artisan feature:on database larachain_logging

Forking to Private repo.

Here are some docs from ChatGPT that I am still testing:

Yes, you're correct that on GitHub, you cannot create a private fork from a public repository. But there's a workaround for this. You can effectively create a "manual" private fork by duplicating the repository. Here's how to do it:

  1. Create a new private repository on GitHub. This will be your private "fork."

  2. Clone the public repository to your local machine:

    git clone https://github.com/original_owner/original_repo.git
  3. Navigate into the directory that was just created (it will have the same name as the repository):

    cd original_repo
  4. Remove the link to the original repository:

    git remote remove origin
  5. Link the local repository to your new private repository:

    git remote add origin https://github.com/your_username/new_repo.git
  6. Push the local repository to your private repository:

    git push -u origin main

You now have a copy of the public repository as a private repository on your GitHub.

When the public repository gets updates, you can merge them into your private repository by adding the public repository as a remote:

git remote add upstream https://github.com/original_owner/original_repo.git

Then, you can fetch the updates:

git fetch upstream

And merge them into your private repository:

git merge upstream/main

Or, if you want to rebase (apply your changes on top of the fetched changes):

git rebase upstream/main

Then, push your changes to your private repository:

git push origin main

That's it! This will allow you to have a private "fork" of a public repository and to merge updates from the public repository into your private one.

Test

composer test

larachain's People

Contributors

alnutile avatar krmroland avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.