Merged
Conversation
Convert server to an OpenAI-compatible API (/v1/chat/completions and /v1/models) that returns tool_calls for robot_action and show_emotion; update request/response models and usage/usage estimation. Add an examples/chat_client_openai.py client and reorganize benchmark tooling into a benchmarks/ directory with README and updated multilingual/server benchmarks to call the new OpenAI-style endpoint. Move scripts and data into scripts/ and data/ directories, remove legacy chat_client files, and rename docker/Dockerfile.functiongemma -> docker/Dockerfile. Update README with OpenAI-compatible usage and testing notes and adjust CI workflow to use the new Docker image name and Dockerfile path.
Adjust model and data paths and tidy example imports: - examples/chat_client_openai.py: consolidate OpenAI SDK import at module level and remove redundant import/extra blank lines in test_with_openai_sdk. - scripts/chat-g1.py: switch HF_MODEL to OpenmindAGI/functiongemma-finetuned-g1-multilingual (was wenjinf0811/functiongemma-robot-actions) and remove an outdated comment block. - scripts/train-g1.py: point TRAIN_FILE to ./data/train-g1.jsonl and simplify the function definitions header. These changes standardize model/data locations and clean up the example code for clarity.
Add .typos.toml with a custom word entry and apply small style/formatting cleanups across the repo: reformat LANG_NAMES and language stats dict in benchmark, wrap long f-strings into multi-line prints, normalize newlines/imports and simplify some print calls in examples, remove an extra blank line in script, and collapse a tokenizer call onto a single line in the server. These changes are purely stylistic and improve readability without altering behavior.
Modernize typing and clean up formatting across server and training script. Replaced Optional[...] annotations with X | None union syntax and removed Optional import; updated several Pydantic field types. Wrapped long expressions (MODEL_NAME, logger.info, tokenizer(...) calls) for readability. Also simplified file open call in scripts/train-g1.py by removing the explicit "r" mode. These are non-functional readability/modernization changes.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the Dockerfile