1. 03 Jan, 2026 1 commit
  2. 12 Dec, 2025 1 commit
    • Devon Rifkin's avatar
      docs: add docs for v1/responses and rework openai compat section (#13416) · 9f782285
      Devon Rifkin authored
      
      
      * docs: add docs for v1/responses and rework openai compat section
      
      I reworked the examples to be separated by topic and to be fully
      runnable (i.e., they now log output instead of just suggesting how a
      call might be made).
      
      We now use `<CodeGroup>`s so that each example has a dropdown on the
      docs site for users to choose, which makes the examples a lot more
      digestible (since you only see approx 1/3 of the code you used to).
      
      I also added a new tool to extract code examples into files so that it's
      easier to actually run them and check that they work.
      
      ## Example
      
      ```shell
      go run docs/tools/extract-examples/main.go docs/api/openai-compatibility.mdx
      ```
      
      Output:
      
      ```
      Extracting code examples to: /var/folders/vq/wfm2g6k917d3ldzpjdxc8ph00000gn/T/mdx-examples-3271754368
      
        - 01_basic.py
        - 01_basic.js
        - 01_basic.sh
        - 02_responses.py
        - 02_responses.js
        - 02_responses.sh
        - 03_vision.py
        - 03_vision.js
        - 03_vision.sh
      
      Extracted 9 file(s) to /var/folders/vq/wfm2g6k917d3ldzpjdxc8ph00000gn/T/mdx-examples-3271754368
      
      To run examples:
      
        cd /var/folders/vq/wfm2g6k917d3ldzpjdxc8ph00000gn/T/mdx-examples-3271754368
        npm install   # for JS examples
      
      then run individual files with `node file.js`, `python file.py`, `bash file.sh`
      ```
      
      In the future we should consider actually running the examples in CI and
      having some sort of acceptance test so we can automatically detect when
      our examples break. So this is just a start in that direction.
      
      * Update docs/api/openai-compatibility.mdx
      Co-authored-by: default avatarParth Sareen <parth.sareen@ollama.com>
      
      * Update docs/api/openai-compatibility.mdx
      Co-authored-by: default avatarParth Sareen <parth.sareen@ollama.com>
      
      ---------
      Co-authored-by: default avatarParth Sareen <parth.sareen@ollama.com>
      9f782285
  3. 28 Oct, 2025 2 commits
  4. 28 Jul, 2025 1 commit
  5. 07 Feb, 2025 1 commit
  6. 13 Dec, 2024 1 commit
  7. 08 Dec, 2024 2 commits
  8. 06 Dec, 2024 1 commit
  9. 23 Oct, 2024 1 commit
  10. 25 Sep, 2024 1 commit
  11. 10 Sep, 2024 1 commit
  12. 29 Aug, 2024 1 commit
  13. 13 Aug, 2024 1 commit
  14. 02 Aug, 2024 2 commits
  15. 01 Aug, 2024 4 commits
  16. 26 Jul, 2024 1 commit
  17. 25 Jul, 2024 2 commits
  18. 17 Jul, 2024 1 commit
  19. 02 Jul, 2024 1 commit
  20. 28 Jun, 2024 1 commit
  21. 14 Jun, 2024 1 commit
  22. 03 May, 2024 1 commit
  23. 26 Mar, 2024 1 commit
  24. 08 Feb, 2024 2 commits
  25. 07 Feb, 2024 3 commits