Repository navigation
libmoss v0.29.0
·
14 commits
to main
since this release
Precompiled C SDK binaries for the Moss SDK.
Changed
- Breaking change:
moss_inference_responses_createreplacesmoss_inference_chat_completions_create, in the shape of OpenAI's Responses API, and calls/responsesunder the base URL. The request JSON takesinput, a string or a list of items, andinstructionsin place ofmessages, plusmax_output_tokens, and function tools are flat. The callback, aMossInferenceEventFnin place ofMossInferenceChunkFn, gets each Responses event as JSON, such asresponse.output_text.delta, and the stream ends afterresponse.completedorresponse.incomplete. Without a callback,out_jsongets theresponseof that last event, plusrequest_idwhen the reply has one, and it is NULL when a callback stopped the stream first. A function call's result goes back ininputas afunction_call_outputitem, after theoutputitems as they came, whosemcp_callitems give the model the earlier tool results. Aresponse.failedorerrorevent fails the call with its message and code, and once anmcp_callitem has arrived every failure has the codefailed_after_tool_call. Moss stores nothing:storeis ignored, andprevious_response_id,background,includeand built-in tools fail with the codeunsupported_parameter. The third argument iscall_options_json, the name its error messages use.MOSS_INFERENCE_API_VERSIONis 3. - Every request the library makes, such as model and index downloads, control-plane calls, authentication, uploads, telemetry and inference, sends a
moss-sdk/<version>User-Agent.
Removed
moss_inference_chat_completions_create,MossInferenceChunkFn, the chat completion JSON joined from the chunks with itschoices,logprobsandmoss_tool_steps, and themoss_tool_stepchunks.
Fixed
- On Linux, TLS no longer trusts emSign ECC Root CA - G3, which
webpki-roots1.0.10 drops after the private keys of eight eMudhra intermediate CAs were compromised. macOS and Windows use the system trust store.
Platforms
| Archive | OS | Arch |
|---|---|---|
libmoss-v0.29.0-aarch64-apple-darwin.tar.gz |
macOS | ARM64 (Apple Silicon) |
libmoss-v0.29.0-x86_64-unknown-linux-gnu.tar.gz |
Linux | x86_64 |
libmoss-v0.29.0-aarch64-unknown-linux-gnu.tar.gz |
Linux | ARM64 |
libmoss-v0.29.0-x86_64-pc-windows-msvc.tar.gz |
Windows | x86_64 |
Contents
Each archive contains:
include/libmoss.h- C headerlib/libmoss.dylib,lib/libmoss.soorlib/moss.dll- shared libraryLICENSE-THIRD-PARTY.txt- licenses of the third-party code the library links
Windows archives also contain the DLL import library lib/moss.dll.lib.
Usage
Extract, then compile and link. The macOS dylib ships with an
@rpath/libmoss.dylib install name, so pass an -rpath that
resolves to lib/ or the binary aborts at launch with
"Library not loaded: @rpath/libmoss.dylib ... no LC_RPATH's found":
# macOS
clang your_app.c -o your_app -Iinclude -Llib -lmoss \
-Wl,-rpath,@loader_path/lib \
-framework Security -framework SystemConfiguration
# Linux
gcc your_app.c -o your_app -Iinclude -Llib -lmoss -lpthread -lm -ldl