sigoden / aichat

All-in-one AI CLI tool that integrates 20+ AI platforms, including OpenAI, Azure-OpenAI, Gemini, Claude, Mistral, Cohere, VertexAI, Bedrock, Ollama, Ernie, Qianwen, Deepseek...
Apache License 2.0
3.28k stars 217 forks source link

The CLI version of OpenAI's GPTs #517

Open sigoden opened 1 month ago

sigoden commented 1 month ago

The CLI version of OpenAI's GPTs (agents)

Isn't combining roles and function calls the essence of GPTs?

Why GPTs/Agents

Related functions are grouped together, making them suitable for specific tasks and easy to share.

File Structure

<llm-functions-dir>
├── agents
│   └── agent1
│       ├── functions.json              # Function declarations
│       └── index.yaml                  # agent definition
└── agents.txt                          # List of agents

<agents-config-dir>
└── agents
    └── agent1
        ├── message.md                # Saved messages
        ├── rag.bin                   # Generated embeddings store
        └── sessions/                 # Saved sessions

Agent definition

name: Test
description:  A test ai agent
version: 0.1.0
instructions: You are a test ai agent to ... 
variables:
  - name: name
    description: your name
    default: alice
conversation_starters:
  - What can you do?
documents:
  - files/doc.pdf

CLI

--agent <name>          Start a agent
--list-agents           List all agents

Chat-REPL

.agent <name>           Enter agent Mode
.starter <text>...      Use the converstaion starter
.info agent             View the agent Info
.exit agent             Exit agent Mode

agent config

agent_prelude: null
agents:
  - name: todo-sh
    model: openai:gpt-4o
    temperature: null
    top_p: null
    dangerously_functions_filter: null

Everyone is welcome to discuss what's missing and its value.

blob42 commented 3 weeks ago

I think it would be great to have some sort of memory implementation for RAG on top of the knowledge ingestion.

I would imlement memory as a simple key,value with tag system.

knowledge.yaml

documents: (RAG ingestion)
 - path (dir or file)
 - ...

memory:
  location:
      value: (description of some location) 
      tags: birthplace,origin
  character:
      value: Foo is  (detailed character description ...)
      tags: main_character
  backstory:
      file: (path to file for ingestion)
      tags: ...
sigoden commented 3 weeks ago

579 implment this feature.