feat(rig-1197): handle llama.cpp tool call (#1408)#1409
feat(rig-1197): handle llama.cpp tool call (#1408)#1409gold-silver-copper merged 11 commits into0xPlaygrounds:mainfrom
Conversation
Signed-off-by: Lars Weber <lars@inqode.solutions>
joshua-mo-143
left a comment
There was a problem hiding this comment.
See comments. Rest looks ok to me
| fn deserialize_arguments<'de, D>(deserializer: D) -> Result<Value, D::Error> | ||
| where | ||
| D: Deserializer<'de>, | ||
| { | ||
| let value = Value::deserialize(deserializer)?; | ||
|
|
||
| match value { | ||
| Value::String(s) => serde_json::from_str(&s).map_err(serde::de::Error::custom), | ||
| other => Ok(other), | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
please add docstring to explain why this is required (it's not immediately clear to anyone who reads this in the future if they don't refer back to this PR)
There was a problem hiding this comment.
good idea. Added a comment for that.
| pub name: String, | ||
| #[serde(with = "json_utils::stringified_json")] | ||
| #[serde( | ||
| serialize_with = "json_utils::stringified_json::serialize", |
There was a problem hiding this comment.
Is this correct? It seems to have been perfectly fine before to my knowledge
There was a problem hiding this comment.
For openai its fine. But with llama.cpp there is a problem. See here #1408
Signed-off-by: Lars Weber <lars@inqode.solutions>
|
This was a good PR overall, I only made some minor changes and tagged on some extra bug fixes. Finally I tested this PR on a local llama.cpp instance and it was successful. |
handle llama.cpp tool call
closes #1408