Skip to content

Examples

This section provides comprehensive examples of how to use argo-proxy with different approaches and APIs.

Raw Requests

For examples of how to use the raw request utilities (e.g., httpx, requests), refer to:

Direct Access to ARGO

OpenAI Compatible Requests

Vision and Image Input

OpenAI Client

For examples demonstrating the use case of the OpenAI client (openai.OpenAI), refer to:

Vision and Image Input

Tool Call Examples

The experimental tool calls (function calling) interface has been available since version v2.7.5.alpha1.

For more usage details, refer to the OpenAI documentation.

Project Structure

This project is still under active development. Folders and files may be added or removed without notice. The following is captured at version `v2.7.6`.

The following is an overview of the project's directory structure:

$ tree -I "__pycache__|*.egg-info|dist|dev_scripts|config.yaml|docs"
.
├── config.sample.yaml
├── examples
   ├── openai_client
      ├── chat_completions.py
      ├── chat_completions_stream.py
      ├── embedding.py
      ├── function_calling_chat.py
      ├── function_calling_response.py
      ├── legacy_completions.py
      ├── legacy_completions_stream.py
      ├── o3_mini_simple_chatbot.py
      ├── responses.py
      └── responses_stream.py
   └── raw_requests
       ├── argo_chat.py
       ├── argo_chat_stream.py
       ├── argo_embed.py
       ├── chat_completions.py
       ├── chat_completions_stream.py
       ├── embedding.py
       ├── function_calling_chat.py
       ├── function_calling_response.py
       ├── legacy_completions.py
       ├── legacy_completions_stream.py
       ├── o1_mini_chat_completions.py
       ├── responses.py
       └── responses_stream.py
├── LICENSE
├── Makefile
├── pyproject.toml
├── README.md
├── run_app.sh
├── src
   └── argoproxy
       ├── app.py
       ├── cli.py
       ├── config.py
       ├── endpoints
          ├── chat.py
          ├── completions.py
          ├── embed.py
          ├── extras.py
          └── responses.py
       ├── __init__.py
       ├── models.py
       ├── performance.py
       ├── py.typed
       ├── tool_calls
          ├── input_handle.py
          └── output_handle.py
       ├── types
          ├── chat_completion.py
          ├── completions.py
          ├── embedding.py
          ├── function_call.py
          ├── __init__.py
          └── responses.py
       └── utils
           ├── input_handle.py
           ├── misc.py
           ├── tokens.py
           └── transports.py
└── timeout_examples.md

10 directories, 54 files