Skip to content

Issue recognizing tool for local LLM #84

@RichardHooijmaijers

Description

@RichardHooijmaijers

I am running into an issue when following the example on the pkgdown.
The only thing that was adapted is usage of ollama instead of chatgtp. All went well up to the point where the actual chat call is given:

library(ragnar)
#> Warning: package 'ragnar' was built under R version 4.5.1
store_location <- "r4ds.ragnar.duckdb"
store <- ragnar_store_connect(store_location, read_only = TRUE)
chat <- ellmer::chat_ollama(base_url = "http://localhost:11434",  model="llama3.2")
ragnar_register_tool_retrieve(chat, store, top_k = 10)
chat$chat("How can I subset a dataframe?")
#> ◯ [tool call] pd.DataFrame.loc(df = "True", labels = "None", loc = "[0:5,
#> 0:3]")
#> ■ #> Error: Unknown tool

The store was created as

store <- ragnar_store_create(
  store_location,
  embed = \(x) ragnar::embed_ollama(x, model = "snowflake-arctic-embed2:568m", base_url = "http://localhost:11434")
)

I get an answer but without using the store. Any help is greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions