Skip to content

Commit

Permalink
fix: fixed build after anthropic merge
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Dec 2, 2024
1 parent 426dbce commit 7c34a16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nerve-core/src/agent/generator/anthropic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl AnthropicClient {
let mut tools = vec![];

// if native tool calls are supported (and XML was not forced)
if state.lock().await.native_tools_support {
if state.lock().await.use_native_tools_format {
// for every namespace available to the model
for group in state.lock().await.get_namespaces() {
// for every action of the namespace
Expand Down Expand Up @@ -161,7 +161,7 @@ impl Client for AnthropicClient {
}

// if the last message is an assistant message, remove it
if let Some(Message { role, content }) = messages.last() {
if let Some(Message { role, content: _ }) = messages.last() {
// handles "Your API request included an `assistant` message in the final position, which would pre-fill the `assistant` response"
if matches!(role, Role::Assistant) {
messages.pop();
Expand Down

0 comments on commit 7c34a16

Please sign in to comment.