-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #487 from trueagi-io/msgspace
support for spaces in llm-gate
- Loading branch information
Showing
3 changed files
with
125 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
!(extend-py! llm_gate) | ||
|
||
!(import! &msgs test_guide_prompt.metta) | ||
|
||
; Function for calls still cannot be put into the prompt space, because | ||
; they will not be evaluated, when the functional call is evoked here | ||
(= (doc calc_math) | ||
(Doc | ||
(description "You should call this function with a mathematical expression in Scheme") | ||
(parameters | ||
(expression "Mathematical expression in Scheme" ()) | ||
)) | ||
) | ||
; This is another limitation: LLM output should somehow be transormed to MeTTa expressions | ||
(= (calc_math $expr $msgs) | ||
($expr is not evaluated, because it is a string atm)) | ||
|
||
(= (user-query) "What is the result of 111102 + 18333?") | ||
|
||
! (llm &msgs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(system "Answer the user question. Try to reason carefully.") | ||
|
||
(user (user-query)) | ||
|
||
(function calc_math) |