mirror of
https://github.com/Hopiu/llm.git
synced 2026-05-20 11:31:52 +00:00
Allow "reasoning" for extra-openai-models.yaml (#766)
* Allow "reasoning" for extra-openai-models.yaml Currently you get an error when trying to use `-o reasoning_effort high` with a model that has been defined in `extra-openai-models.yaml`. This allows a `reasoning` field. * Mention reasoning: true in other OpenAI models docs --------- Co-authored-by: Simon Willison <swillison@gmail.com>
This commit is contained in:
parent
02999e398d
commit
6cb16a1d1a
2 changed files with 4 additions and 0 deletions
|
|
@ -123,6 +123,8 @@ The `model_id` is the identifier that will be recorded in the LLM logs. You can
|
|||
|
||||
If the model is a completion model (such as `gpt-3.5-turbo-instruct`) add `completion: true` to the configuration.
|
||||
|
||||
For reasoning models like `o1` or `o3-mini` add `reasoning: true`.
|
||||
|
||||
With this configuration in place, the following command should run a prompt against the new model:
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ def register_models(register):
|
|||
api_version = extra_model.get("api_version")
|
||||
api_engine = extra_model.get("api_engine")
|
||||
headers = extra_model.get("headers")
|
||||
reasoning = extra_model.get("reasoning")
|
||||
kwargs = {}
|
||||
if extra_model.get("can_stream") is False:
|
||||
kwargs["can_stream"] = False
|
||||
|
|
@ -122,6 +123,7 @@ def register_models(register):
|
|||
api_version=api_version,
|
||||
api_engine=api_engine,
|
||||
headers=headers,
|
||||
reasoning=reasoning,
|
||||
**kwargs,
|
||||
)
|
||||
if api_base:
|
||||
|
|
|
|||
Loading…
Reference in a new issue