Skip to content

Commit

Permalink
Merge pull request #43 from BBai-Tips/staging
Browse files Browse the repository at this point in the history
normalized tool results and responses - better feedback to LLM and clearer output in conversation
  • Loading branch information
cngarrison authored Oct 14, 2024
2 parents 8ee8728 + 2506d87 commit e584230
Show file tree
Hide file tree
Showing 121 changed files with 5,406 additions and 2,142 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



## [0.0.26-beta] - 2024-10-14

### Changed

- normalized tool results and responses - better feedback to LLM and clearer output in conversation
- New LLM tool: `conversation_metrics` for calculating the current turn and token counts,
needed for the upcoming `conversation_summary` (& truncation) tool
- improved handling for conversation log entries; loading saved conversations and conversation answers
have the same handling as normal entries during conversation


## [0.0.25-beta] - 2024-10-10

### Changed
Expand Down
2 changes: 1 addition & 1 deletion CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ It supports vector embeddings for code and text chunks from local repositories,
- **Session**: The entire duration of a user's interaction with BBai, which may include multiple conversations.
- **Project**: The collection of files and resources that BBai is working with.
- **Tool**: A specific function or capability that the LLM can use to perform actions or retrieve information.
- **Patch**: A set of changes to be applied to a file.
- **Change**: A set of changes to be applied to a file.
- **Commit**: A saved state of the project in the version control system.
- **Embedding**: A numerical representation of text used for semantic search and comparison.
- **Token**: The basic unit of text processing for the LLM, typically a word or part of a word.
Expand Down
19 changes: 11 additions & 8 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
- file listing
- vector embeddings
- fallback to file_search tool if none of the above are used
2. Allow users to specify projectInfo type in the config
3. Implement a repoInfo persistence solution
4. Don't create tags file in .bbai - either save with conversation or use the persistence solution

## Patching and Git Integration
## Changes (mutating) and Git Integration
1. Add config option to create new branch when starting a conversation
2. Implement a way to "end" conversation which merges branch back to original

Expand All @@ -27,20 +25,19 @@
2. Move project-info towards the beginning of the system prompt
3. Create a high-level system prompt template to combine baseSystem with project info and files added
4. Update system prompt to further clarify that assistant is talking to both BBai and user:
- Responses to tool use (e.g., "Patch applied successfully") should be directed to BBai and wrapped in tags for parsing
- Responses to tool use (e.g., "Change applied successfully") should be directed to BBai and wrapped in tags for parsing
- Everything not inside <bbai> tags will be shown to user as part of the conversation
- 'User' message showing 'tool result' should be clearly separate from rest of the conversation

## Logging and Output
1. Implement terse and verbose options for conversation log:
- Verbose option to show results of tool use and details such as contents of patches being applied
- Implement fancy formatting for showing patches, similar to git diff output
- Verbose option to show results of tool use and details such as contents of changes being applied
- Implement fancy formatting for showing changes, similar to git diff output
2. Format JSON in display of logs

## Configuration and Customization
1. Create configs for different interfaces (API, BUI, CLI, DUI)
2. Implement interface-specific settings in the configuration file
1. Make the 'post-run' script (currently hard-coded for deno format) a user config option
2. Implement a safety switch (e.g., allow_dangerous_user_scripts) for potentially dangerous user scripts
3. Create a meta tool to choose which toolset to load (e.g., different tools for coding projects vs. creative writing)
4. Create configs for:
Expand All @@ -61,7 +58,6 @@
1. Create a `bbai doctor` command to zip a conversation for sharing
2. Create a summarize history tool to reduce token count and delete earlier messages
3. Implement new tools:
- Move files
- Record memory, remember instruction/guideline

## For CHANGELOG
Expand Down Expand Up @@ -129,6 +125,13 @@
- Check if API is running; if not, start it, and then kill it when exiting
- Ensure the API logs go to file and not to chat terminal (Unless debug CLI arg is passed)
- Don't start API in watch mode if auto-started by `bbai chat` (pass args via action(...))
43. √ Allow users to specify projectInfo type in the config
44. √ Don't create tags file in .bbai - either save with conversation or use the persistence solution
45. √ Make the 'post-run' script (currently hard-coded for deno format) a user config option
46. √ Implement new tools:
- Move files
- Rename files



Thoughts...
Expand Down
4 changes: 2 additions & 2 deletions api/deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bbai-api",
"version": "0.0.25-beta",
"version": "0.0.26-beta",
"exports": "./src/main.ts",
"tasks": {
"start": "deno run --allow-read --allow-write --allow-run --allow-net --allow-env src/main.ts",
Expand All @@ -12,7 +12,7 @@
"build-local": "deno task generate-tools-manifest && deno compile --allow-env --allow-net --allow-read --allow-run --allow-write --output ../build/bbai-api src/main.ts",
"format": "deno fmt",
"check-format": "deno fmt --check",
"check-types": "deno check src/main.ts",
"check-types": "deno check src/main.ts src/llms/tools/*.tool/*",
"update-deps": "deno cache src/main.ts && deno cache tests/deps.ts"
},
"importMap": "../import_map.json",
Expand Down
Empty file added api/llms/llmTool.ts
Empty file.
Loading

0 comments on commit e584230

Please sign in to comment.