Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add NoSchema render implementation for annotation messages #244

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
83df820
feat: Add AnnotationMessage implementation
devin-ai-integration[bot] Nov 26, 2024
261f58a
fix: Add OpenAI to test dependencies and fix rendering tests
devin-ai-integration[bot] Nov 26, 2024
523933d
fix: Update test dependencies to match main Project.toml targets
devin-ai-integration[bot] Nov 26, 2024
8ea36dd
fix: Add HTTP to test dependencies
devin-ai-integration[bot] Nov 26, 2024
c35d96c
fix: Add HTTP to test targets
devin-ai-integration[bot] Nov 26, 2024
76358e6
fix: Add HTTP to extras section in Project.toml
devin-ai-integration[bot] Nov 26, 2024
8b5f390
fix: Add JSON3 to test dependencies
devin-ai-integration[bot] Nov 26, 2024
9805b68
fix: Add OpenAI to test dependencies
devin-ai-integration[bot] Nov 26, 2024
2dc7dcd
fix: Add JSON3 to test dependencies
devin-ai-integration[bot] Nov 26, 2024
185201d
fix: Ensure proper package loading in test environment
devin-ai-integration[bot] Nov 26, 2024
0eaa679
fix: Add explicit test dependencies installation step in CI
devin-ai-integration[bot] Nov 26, 2024
2ccc893
fix: Add version constraints to test dependencies
devin-ai-integration[bot] Nov 26, 2024
0182cd2
fix: Add explicit Aqua import in test environment
devin-ai-integration[bot] Nov 26, 2024
a847aaf
fix: Add Snowball version constraint to compat section
devin-ai-integration[bot] Nov 26, 2024
14c32f4
fix: Add StreamCallbacks to test dependencies
devin-ai-integration[bot] Nov 26, 2024
506c31d
fix: Add PrecompileTools and Preferences to test dependencies
devin-ai-integration[bot] Nov 26, 2024
c79de85
fix: Add AbstractTrees to test dependencies
devin-ai-integration[bot] Nov 26, 2024
c03cf59
fix: Add Statistics to test dependencies
devin-ai-integration[bot] Nov 26, 2024
eb02701
fix: Add GoogleGenAI to test dependencies
devin-ai-integration[bot] Nov 26, 2024
04d1ebd
fix: Add Base64 to test dependencies
devin-ai-integration[bot] Nov 26, 2024
7c0777c
fix: Add standard library dependencies (Dates, Logging, Pkg, REPL)
devin-ai-integration[bot] Nov 26, 2024
b693ed4
fix: Add Random to test dependencies
devin-ai-integration[bot] Nov 26, 2024
fc4e7bb
fix: Add version constraints for standard library dependencies
devin-ai-integration[bot] Nov 26, 2024
04615db
fix: Add Markdown version constraint
devin-ai-integration[bot] Nov 26, 2024
1129254
fix: Add PromptingTools version constraint
devin-ai-integration[bot] Nov 26, 2024
70fa331
fix: Add Test version constraint
devin-ai-integration[bot] Nov 26, 2024
a94d75f
fix: Add julia version constraint
devin-ai-integration[bot] Nov 26, 2024
ba9e52a
fix: Add name field to test Project.toml
devin-ai-integration[bot] Nov 26, 2024
324ea9a
fix: Add uuid field to test Project.toml
devin-ai-integration[bot] Nov 26, 2024
409e60f
fix: Use different uuid for test Project.toml
devin-ai-integration[bot] Nov 26, 2024
e420bb1
fix: Remove name and uuid from test Project.toml
devin-ai-integration[bot] Nov 26, 2024
fa6bade
fix: Reorder dependencies in Project.toml files to canonical format
devin-ai-integration[bot] Nov 26, 2024
9261270
feat: Add NoSchema render implementation for annotation messages
devin-ai-integration[bot] Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ jobs:
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- name: Install test dependencies
run: |
julia --project=test -e '
using Pkg;
Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate();
Pkg.precompile()'
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
Expand Down Expand Up @@ -67,4 +74,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
GKSwstype: "100" # for Plots.jl plots (if you have them)
JULIA_DEBUG: "Documenter"
JULIA_DEBUG: "Documenter"
6 changes: 5 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ PrecompileTools = "1"
Preferences = "1"
REPL = "<0.0.1, 1"
Random = "<0.0.1, 1"
Snowball = "0.1"
SparseArrays = "<0.0.1, 1"
Statistics = "<0.0.1, 1"
StreamCallbacks = "0.4, 0.5"
Expand All @@ -61,10 +62,13 @@ julia = "1.9, 1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
OpenAI = "e9f21f70-7185-4079-aca2-91159181367c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[targets]
test = ["Aqua", "FlashRank", "SparseArrays", "Statistics", "LinearAlgebra", "Markdown", "Snowball", "Unicode"]
test = ["Aqua", "FlashRank", "SparseArrays", "Statistics", "LinearAlgebra", "Markdown", "Snowball", "Unicode", "HTTP", "JSON3", "OpenAI"]
23 changes: 23 additions & 0 deletions src/constants.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Constants used throughout the package

# Model Registry
const MODEL_REGISTRY = Dict{String,Any}()

# Default Models
const MODEL_CHAT = "gpt-3.5-turbo"
const MODEL_COMPLETION = "gpt-3.5-turbo-instruct"

# Reserved keywords that cannot be used as placeholders in templates
const RESERVED_KWARGS = Symbol[
:model, :api_key, :verbose, :return_all, :dry_run, :conversation,
:streamcallback, :no_system_message, :name_user, :name_assistant,
:http_kwargs, :api_kwargs
]

# Default system message
const DEFAULT_SYSTEM_MESSAGE = "You are a helpful AI assistant."

# Default API Keys
const OPENAI_API_KEY = get(ENV, "OPENAI_API_KEY", "")
const ANTHROPIC_API_KEY = get(ENV, "ANTHROPIC_API_KEY", "")
const GOOGLE_API_KEY = get(ENV, "GOOGLE_API_KEY", "")
3 changes: 3 additions & 0 deletions src/llm_shared.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ function render(schema::NoSchema,
count_system_msg += 1
# move to the front
pushfirst!(conversation, msg)
elseif isabstractannotationmessage(msg)
# Silently skip annotation messages - they are not meant for LLM consumption
continue
else
# Note: Ignores any DataMessage or other types for the prompt/conversation history
@warn "Unexpected message type: $(typeof(msg)). Skipping."
Expand Down
Loading
Loading