mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
e00e85765b
This PR merges code from `coder/aibridge` repository into `coder/coder`. It was split into 4 PRs for easier review but stacked PRs will need to be merged into this PR so all checks pass. * https://github.com/coder/coder/pull/24190 -> raw code copy (this PR, before merging PRs on top of it, it was just 1 commit: https://github.com/coder/coder/commit/70d33f33200c7e77df910957595715f81f9bec24) * https://github.com/coder/coder/pull/24570 -> update imports in `coder/coder` to use copied code * https://github.com/coder/coder/pull/24586 -> linter fixes and CI integration (also added README.md) * https://github.com/coder/coder/pull/24571 -> added exclude to scripts/check_emdash.sh check Original PR message (before PR squash): Moves coder/aibridge code into coder/coder repository. Omitted files: - `go.mod`, `go.sum`, `.gitignore`, `.github/workflows/ci.yml,` `Makefile`, `LICENSE`, `README.md` (modified README.md is added later) - `.github`, `example`, `buildinfo,` `scripts` directories Simple verification script (will list omitted files) ``` tmp=$(mktemp -d) echo "$tmp" git clone --depth=1 https://github.com/coder/aibridge "$tmp/aibridge" git clone --depth=1 --branch pb/aibridge-code-move https://github.com/coder/coder "$tmp/coder" diff -rq --exclude=.git "$tmp/aibridge" "$tmp/coder/aibridge" # rm -rf "$tmp" ```
79 lines
2.3 KiB
Plaintext
79 lines
2.3 KiB
Plaintext
-- request --
|
|
{
|
|
"input": "explain why this is funny.",
|
|
"model": "gpt-4o-mini",
|
|
"previous_response_id": "resp_0388c79043df3e3400695f9f83cd6481959062cec6830d8d51",
|
|
"stream": false
|
|
}
|
|
|
|
-- non-streaming --
|
|
{
|
|
"id": "resp_0388c79043df3e3400695f9f86cfa08195af1f015c60117a83",
|
|
"object": "response",
|
|
"created_at": 1767874438,
|
|
"status": "completed",
|
|
"background": false,
|
|
"billing": {
|
|
"payer": "developer"
|
|
},
|
|
"completed_at": 1767874441,
|
|
"error": null,
|
|
"incomplete_details": null,
|
|
"instructions": null,
|
|
"max_output_tokens": null,
|
|
"max_tool_calls": null,
|
|
"model": "gpt-4o-mini-2024-07-18",
|
|
"output": [
|
|
{
|
|
"id": "msg_0388c79043df3e3400695f9f87369c8195a0d1a82a06f96d56",
|
|
"type": "message",
|
|
"status": "completed",
|
|
"content": [
|
|
{
|
|
"type": "output_text",
|
|
"annotations": [],
|
|
"logprobs": [],
|
|
"text": "The joke plays on a clever wordplay and a double meaning. \n\n1. **Outstanding in his field**: The phrase can mean that someone is exceptionally good at what they do (outstanding performance) and also literally refers to the scarecrow being in a field (like a farm field). \n\n2. **Scarecrow context**: Scarecrows are placed in fields to scare away birds, so the idea of a scarecrow being \"outstanding\" can lead to a funny mental image.\n\nThe humor comes from the unexpected twist of a literal phrase being interpreted in a figurative way, creating a light and playful pun."
|
|
}
|
|
],
|
|
"role": "assistant"
|
|
}
|
|
],
|
|
"parallel_tool_calls": true,
|
|
"previous_response_id": "resp_0388c79043df3e3400695f9f83cd6481959062cec6830d8d51",
|
|
"prompt_cache_key": null,
|
|
"prompt_cache_retention": null,
|
|
"reasoning": {
|
|
"effort": null,
|
|
"summary": null
|
|
},
|
|
"safety_identifier": null,
|
|
"service_tier": "default",
|
|
"store": true,
|
|
"temperature": 1.0,
|
|
"text": {
|
|
"format": {
|
|
"type": "text"
|
|
},
|
|
"verbosity": "medium"
|
|
},
|
|
"tool_choice": "auto",
|
|
"tools": [],
|
|
"top_logprobs": 0,
|
|
"top_p": 1.0,
|
|
"truncation": "disabled",
|
|
"usage": {
|
|
"input_tokens": 43,
|
|
"input_tokens_details": {
|
|
"cached_tokens": 0
|
|
},
|
|
"output_tokens": 129,
|
|
"output_tokens_details": {
|
|
"reasoning_tokens": 0
|
|
},
|
|
"total_tokens": 172
|
|
},
|
|
"user": null,
|
|
"metadata": {}
|
|
}
|