Last active
April 20, 2026 15:04
-
-
Save up1/48d6a21cb30751b8737fded83b29e3b9 to your computer and use it in GitHub Desktop.
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
| // เรียกใช้งานผ่าน LiteLLM Proxy | |
| $curl -X POST 'http://127.0.0.1:4000/chat/completions' \ | |
| -H 'Content-Type: application/json' \ | |
| -H 'Authorization: Bearer dummy' \ | |
| -d '{ | |
| "model": "openthaigpt", | |
| "messages": [ | |
| {"role": "user", "content": "สวัสดี"} | |
| ] | |
| }' | |
| // ผลการทำงาน | |
| {"id":"chatcmpl-df9be8edb2ada55cebe1681ae2b9cbf5","created":1776695879, | |
| "model":"openthaigpt","object":"chat.completion", | |
| "choices":[{"finish_reason":"stop","index":0, | |
| "message":{"content":"<think>\nOkay, the user said \"สวัสดี\" which means \"Hello\" in Thai. I need to respond politely. Since they just greeted me, I should acknowledge their greeting and offer help. Maybe start with a friendly response like \"สวัสดีค่ะ! ยินดีที่ได้พบคุณ :) ฉันพร้อมช่วยเหลือในเรื่องใดก็ได้ที่คุณต้องการนะคะ\" to keep it warm and open. That covers thanking them and inviting them to ask for assistance. Keep it simple and friendly.\n</think>\nสวัสดีค่ะ! ยินดีที่ได้พบคุณ :) ฉันพร้อมช่วยเหลือในเรื่องใดก็ได้ที่คุณต้องการนะคะ", | |
| "role":"assistant","provider_specific_fields":{"refusal":null}},"provider_specific_fields":{"stop_reason":null}}], | |
| "usage":{"completion_tokens":175,"prompt_tokens":12,"total_tokens":187}} |
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
| services: | |
| litellm: | |
| image: docker.litellm.ai/berriai/litellm:main-latest | |
| container_name: litellm | |
| ports: | |
| - "4000:4000" | |
| volumes: | |
| - ./litellm_config.yml:/app/config.yaml | |
| command: | |
| - "--config" | |
| - "/app/config.yaml" | |
| environment: | |
| - THAILLM_API_KEY=${THAILLM_API_KEY} | |
| - LITELLM_LOG_LEVEL=debug |
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
| model_list: | |
| - model_name: openthaigpt | |
| litellm_params: | |
| model: openai//model | |
| api_base: http://thaillm.or.th/api/pathumma/v1 | |
| api_key: dummy | |
| extra_headers: | |
| apikey: os.environ/THAILLM_API_KEY | |
| User-Agent: litellm | |
| general_settings: | |
| master_key: dummy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment