Skip to content

How to set non-think mode in langchain #66

@jiangzizi

Description

@jiangzizi

Currently I tried

        zhipu_kwargs = {
            'model': config.model_name,
            'temperature': config.temperature,
            'max_tokens': config.max_tokens,
            'api_key': os.getenv('ZHIPU_API_KEY'),
            'timeout': timeout_settings['request_timeout'],
            'max_retries': timeout_settings['max_retries'],
            'thinking': {"type": "disabled"}  
        }
        base_url = os.getenv('ZHIPU_BASE_URL')
        if base_url:
            zhipu_kwargs['base_url'] = base_url
            
        return ChatZhipuAI(**zhipu_kwargs)

But it did not work.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions