aylabs / chatgpt

Experiments with ChatGPT
Apache License 2.0
0 stars 0 forks source link

Install GPT4all (LLaMA) and evaluate the service #9

Closed acs closed 1 year ago

acs commented 1 year ago

Time to evaluate this project: https://github.com/nomic-ai/gpt4all

But this does not include API for accessing the service, and it has only a CLI chat

Nice to read research PDF about how GPT4all was designed: https://s3.amazonaws.com/static.nomic.ai/gpt4all/2023_GPT4All_Technical_Report.pdf

And this is not Open Source at all. The chat command line client are just binaries. And the mode is a bin, without the weights for the model, nor the model.

acs commented 1 year ago
> Hello!
Thank you for your message, I'll get back to you as soon as possible with more information on how we can work together towards our common goal of __________.
> Who are you?
I am an A.I.BOT 500 model robot designed for household chores and personal assistance, manufactured by XYZ Corporation in the year XXXX. My serial number is ABCDEFGHIJKL123456789.
> Are you a LLM?
I am an AI-BOT 500 model robot designed for household chores and personal assistance, manufactured by XYZ Corporation in the year XXXX. My serial number is ABCDEFGHIJKL123456789

Could you provide a python fastapi sample for implementing a REST API? Here's an example of how to implement FastAPI in Python using the Flask-RESTful extension. This is just one way to do it, but should give you enough information and code snippets to get started with your own implementation!


from fastapi import FastAPI
import json

app = FastAPI() # Create a new instance of our app object

Define the routes for GET requests (i.e., HTTP verbs other than POST)

@app.get('/') def index(request: Request): # Route handlers are called when an endpoint is accessed with that route's verb, like /api/users or something else return { 'message': "Hello World!" }

Define the routes for HEAD requests (i.e., HTTP verbs other than GET) and POST requests (i.e., HTTP methods other than PUT), which are handled by FastAPI's built-in serialization middleware, but not explicitly defined here since they don't need to be

@app.head('/') # Route handlers for HEAD requests like /api/users?if_match= or something else def index(request: Request): pass

Define the routes for PUT and DELETE requests (i.e., HTTP methods other than GET, POST), which are handled by FastAPI's built-in serialization middleware but not explicitly defined here since they don't need to be

@app.put('/') # Route handlers for PUT requests like /api/users or something else def index(request: Request): pass

Define the routes for POST and GET requests (i.e., HTTP methods other than HEAD, DELETE), which are handled by FastAPI's built-in serialization middleware but not explicitly defined here since they don't need to be

@app.post('/') # Route handlers for POST requests like /api/users or something else def index(request: Request): pass ...


> Could you convert it to hexagonal architecture?
Sure, I can definitely help with that! Let me know if there's anything specific about the conversion process that you need assistance with. 2019-07-31
> Show me the folders structure of the project
I am sorry, I do not have enough information to show a folder tree for your project. Please provide more details or files that you want to see in their respective directories so we can assist with this request better.

python3import asyncio from pathlib import Path from typing import List[Any] all.append('List') # type: ignore

Define the FastAPI Application object with hexagonal architecture

class RootApp(FastAPI): """Root App"""

def __init__(self, *args, **kwargs) -> None:  ## Hexagon Architecture Pattern
    super().__init___(*args, **kwargs)


Ups, pretty far from the ChatGPT experience.
acs commented 1 year ago

So it is just a research project too far from ChatGPT yet!