GithubHelp home page GithubHelp logo

akeruai / akeru Goto Github PK

View Code? Open in Web Editor NEW
81.0 3.0 17.0 16.51 MB

Akeru is an open source AI platform built on top of the Akeru AI edge network. The network runs as a Bittensor Subnet, providing a transparent, safe and highly available AI capacities.

Home Page: https://www.akeru.ai/

TypeScript 88.85% CSS 2.59% JavaScript 1.14% Python 0.90% MDX 6.53%
ai assistants bun gpt-4 large-language-models mistral bittensor

akeru's People

Contributors

badmask121 avatar chin-flags avatar cksabari2001 avatar cxalem avatar guibibeau avatar jainil2004 avatar multipletwigs avatar resourcefulmind avatar tobysolutions avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

akeru's Issues

Create MD file of Sprout concepts

We need a glossary to explain what this API does:

AC:

  • start a docs folder
  • include definitions for: threads, users, api keys, messages, files, tools, embeddings etc.
  • include a link to these definitions in the readme

Create a GPT-4 adapter

we need a way to send messages to GPT-4

AC:

  • create an adapter under the adapter folders
  • create the right configuration that reads an API key from env variables
  • create a service that will send messages to GPT and accepts a response

Implement a service mesh state inside validators

Validators shoud ping every minute or at a fixed interval each miner to understand the distance to them. This will help them know where to route a demand in order to be sure the subnet edge network is efficient in serving requests.

[Spike]: Upload documents

We need a way to allow users to upload documents. This issue is to research what is possible:

  • Documents should be stored in a format that is retrievable by agents.
  • Documents should have permissions associated with them. Think of a flexible permission system where users can move documents to different threads or lock it to a specific thread.
  • Do we store documents + embeddings or just embeddings?

Add hosted subnet as option on API

The subnet being now deployec has the capacity to run queries to llama 2 and mistral 7b. Connec them as a data source in the LLM choice of the akeru API

Support streaming as part of thread runs and LLM generations

Problem Statement

  1. Based on a previous PR #9, we have managed to introduce the concept of thread runs, where we await for a response based on the content of the thread.
  2. We should have the option to stream the answer back to the consumer of the api to accommodate for the slow response time of LLMs.
  3. While the adapters are currently generators, we have not supposed streaming over the internet connection yet.

Create a GPT-3.5 adapter

We need a way to send messages to GPT-3.5

Acceptance Criteria:

  • Create an adapter under the adapter folders.
  • Create the right configuration that reads an API key from env variables.
  • Create a service that will send messages to GPT and accepts a response.

Allow creating human users.

Currently, only assistants can be created and creating a human user is made from an helper script. Create an endpoint that allows registering users:

AC:

  • create a POST endpoint at /users
  • Restrict the endpoint to a bearer token.
  • restrict who can create a user, validate permissions
  • the endpoint should save that user in the database (neo4j)
  • the endpoint attaches the right role and permissions to a user (redis)
  • the endpoint returns an API key for that user

notes: have a look at existing endpoints and scripts as there are established patterns for this

Add Contributing Guidelines Link to README

Description

The README is the first point of interaction for those interested in contributing to Akeru.ai. As the project evolves, ensuring that potential contributors can easily find and access the Contributing Guidelines is essential for fostering community involvement and clarifying contribution processes.

Objectives

  • Enhance Navigation: Insert a direct link to the Contributing Guidelines to simplify access for new contributors.
  • Clarify Contribution Process: Make it clear how new members can start contributing, emphasizing transparency and ease of access.
  • Encourage Community Engagement: By providing clear directions and easy access to the guidelines, we aim to motivate more users to contribute.

Expected Outcomes

  • A more navigable README that effectively guides potential contributors to the information they need.
  • Increased contributor engagement due to improved clarity and accessibility of contribution resources.

Tags

  • documentation
  • community

Assignees

This update is a crucial step towards making our project more open and accessible to new contributors, thereby enhancing our community-driven development approach.

Create a contributing guide

Since adding the subnet to the project, contributing can mean different things. We will start to have contributors to only the UI, only the API, only the subnet or even contributors who want to run the full project from end to end. We need better documentation and guides on how to get started contributing.

Acceptance Criteria:

  • Build a contributing section for the UI.
  • Build a contributing section for the API.
  • Build a contributing section for validator and miner code.
  • Host all sections on the contributing page.

designs for the landing page

We need a basic design for the landing page. We could try our hand at doing it ourselves or we could use some tweaked landing page from the figma community pages

AC:

  • basic branding is respected with logo colours
  • simple landing page design is done
  • show and discuss design with team

Enhance README Documentation for Akeru.ai

The README file is the first point of interaction for potential users and contributors to Akeru.ai. As the project grows and incorporates more features, it's crucial that the README accurately reflects the capabilities and mission of Akeru.ai, providing clear and engaging content that facilitates understanding and involvement.

Expected Outcomes:

A comprehensive, well-structured README that serves as an effective entry point for engaging new users and contributors.
Enhanced clarity on technical aspects and project roadmap, facilitating easier onboarding and collaboration.

Can create new assistants

AC:

  • a user can create a new assistant
  • ensure bearer token is present
  • create a user with permissions for the assistant (redis)
  • create the assistant in neo4j

Context:

  • for now don't create relations for files and tools. This will be implemented later

Start landing page package

We need a landing page package to host the future website and the dashboard.

Acceptance Criteria:

  • Investigate a good Web framework to use. Current discussed options are Astro or Next.js.
  • Create a basic package with the framework of choice.
  • Get buy-in from team on the choice of framework.

allow switching assistants to different models

currently we hard code every assistant to use gpt-4. Eventually we want to allow mistral, llama claude and many more.

AC:

  • create methods and endpoints to change the model used by an assistant
  • modify the create assistant endpoints to allow passing in a specific model
  • come up with a sustainable way to keep track of all available models

host validator on railway or digital ocean

similar to the cloudflare miner, we should host the validator on a CI/CD pipeline and provider

AC:

  • on push to main validator is redeployed
  • select a provider,
  • should rejoin the test subnet.

Remove .vscode file and add it to .gitignore file

The .vscode folder has user-specific settings for VS Code which aren't needed, and by adding .vscode to the .gitignore, we make sure that these settings stay local and don't mess up our repo or cause problems between contributors' local dev environments.

Acceptance Critera:

  • Remove the existing.vscode file.
  • Make sure that file is not added again in the future.

Host subttensor on digital ocean

We need to host a testnet of subtensor on digital ocean to connect our own local dev network and start running our edge network.

Assistant responds to message

We need a way to let an assistant respond to a thread.

Blocked by #8 and #11.

Acceptance Criteria:

  • The message endpoint currently is only accepting incoming messages, but does not return assistant messages.
  • Call proper LLM adapter to send the old message and receive the answer. (Don't hard code GPT-4 only. Get the model of the thread from the DB and switch on the right adapter if necessary).
  • Store the answer in the database.
  • Send the answer to the client.
  • Explore elysia streams to stream the answer back. Also request a stream from the GPT-4 API if it's not already one.

Investigate mistral adaptor and hosting

Description:

There are multiple mistral models available. Their advantage is that they are open source. Let's figure out a cost efficient one to use as an available LLM on sprout:

  • figure out if we can self host at a reasonable cost during development
  • create the adaptor to a mistral model

Enhancements on the Assistants domain

Context

  1. We should standardise the role of Assistants with assistant instead of agent as it is what's commonly used in OpenAI's context. It also makes it easier to develop OpenAI Adapters.
  2. Add in instructions to be part of Assistants to give Assistants more context on what they should do.
  3. Add in model to be part of Assistants to allow for adaptive LLM model usage.

image

Create PR template

Overview

We currently do not have a pull request template for our repository. Adding a template would help streamline the pull request process by ensuring key information is included.

Tasks

  • Create .github/PULL_REQUEST_TEMPLATE.md file
  • Add the following suggested sections:
    • Description of changes
    • Related issues
    • Testing done
    • Screenshots (if applicable)

Clean up OOP patterns in validator and cloudflare-miner

As left overs from the subnet template we have inherited a lot of technical dept of a coding style that is far from our own. Let's clean up the OOP patterns. We can keep some of them but inheritance is overly done for our style and offuscates the real functionalities of the code. Let's move closer to a functional style

Transition to a monorepo

We will need soon to create dashboard UIs, a landing page etc. currently sprout is a backend only application. This issue is to move to a monorepo setup.

Acceptance Criteria:

  • explore bun support for monorepos
  • move the current code to a package under a mono repo
  • update the readme properly
  • create scripts at the top level to start the project quickly.

implement streaming in miner and validator

Currentl calling the chat endpoint on validators results in a 5-10 second delay since the LLM workload is slow. We should implement streaming methods that are equivalent in both the miner and the validator to let them act closer to the open AI API

Ollama version of worker

Create a miner similar to the cloudflare miner but one that let's people run their own models and provide them to the edge nertwork:

  • new package is added called ollama-worker
  • give a first option of what people can host that would be easy
  • prorotype joining a network on a local test net

Setup Frontend Architecture

We need to setup the frontend scaffold for the entire application.

We already decided to setup a few things in the codebase like app router and tailwind, but we would be doing a few things with streaming and a few other stuff that I think @GuiBibeau will be positioned to handle.

As of now, we only have this design to get our landing page and get inspiration for our waitlist page:

https://www.figma.com/file/B8cYeNpdAvfezzrzm0AqEk/Sprout?type=design&node-id=0-1&mode=design&t=Y0Qgfc6PWy5iL9go-0

A few things to consider when scaffolding:

  • Documentation
  • i18n
  • Performance
  • Places where we'll need RSCs

I hope this issue write-up isn't too amateurish.

send message to assistant

there should be an endpoint to send a message to an assistant.

AC:

  • the endpoint should be protected by a bearer token
  • Ensure the user has the right permissions to send a message to the conversation
  • ensure the last message is not from a human user, the AI should have time to respond before another message is sent
  • Save the message
  • return from the endpoint a simple success message. This will be updated later.

host cloudflare miner on railway or digital ocean

We need to host a test digital ocean miner on a hosted platform.

AC:

  • pipeline redeploys the code every time a commit to main is done
  • the miner should restart on a new deployment
  • select a proper hosting provider

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.