Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
/ nlcall Public

👾 Call golang function by nature language, a demonstration.

License

Notifications You must be signed in to change notification settings

HFrost0/nlcall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nlcall

👾 Call golang function by nature language, a demonstration.

agent := llm.NewLlmAgent(client)
for _, f := range []any{
    add, greet, weather, lengthOfLongestSubstring, mul, no,
} {
    if _, err := agent.RegisterFn(ctx, f, nlcall.WithLoadDefDir(dir)); err != nil {
        log.Fatal(err)
    }
}
fn, err := agent.AssignCallable(ctx, "1*3*34234*991238=?")
if err != nil {
    log.Fatal(err)
}
res := fn()
fmt.Println(res)

How it works

  • LLM to generate:
    • def doc
    • structured calling data
  • reflection
  • engineering

Thanks

zomi team

About

👾 Call golang function by nature language, a demonstration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages