# OpenAPI\Client\AiApi | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**chat()**](AiApi.md#chat) | **POST** /v1/ai/chat | 元梦ai-对话 | | [**extractText()**](AiApi.md#extractText) | **POST** /v1/ai/extractText | 元梦ai-提取文件文本内容 | | [**tokenCount()**](AiApi.md#tokenCount) | **POST** /v1/ai/tokenCount | 元梦ai-token统计 | ## `chat()` ```php chat($chat_param): \OpenAPI\Client\Model\ResponseOpenAPIChatResult ``` 元梦ai-对话 元梦ai对话 ### 示例 ```php chat($chat_param); print_r($result); } catch (Exception $e) { echo 'Exception when calling AiApi->chat: ', $e->getMessage(), PHP_EOL; } ``` ### 参数 | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **chat_param** | [**\OpenAPI\Client\Model\ChatParam**](../Model/ChatParam.md)| | [optional] | ### 返回类型 [**\OpenAPI\Client\Model\ResponseOpenAPIChatResult**](../Model/ResponseOpenAPIChatResult.md) ### HTTP请求头 - **Content-Type**: `application/json` - **Accept**: `*/*` [[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档) [[返回模型列表]](../../README.md#模型文档) [[返回README]](../../README.md) ## `extractText()` ```php extractText($file, $param): \OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult ``` 元梦ai-提取文件文本内容 提取上传文件的文本内容 ### 示例 ```php extractText($file, $param); print_r($result); } catch (Exception $e) { echo 'Exception when calling AiApi->extractText: ', $e->getMessage(), PHP_EOL; } ``` ### 参数 | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **file** | **\SplFileObject****\SplFileObject**| | [optional] | | **param** | [**\OpenAPI\Client\Model\ExtractTextParam**](../Model/ExtractTextParam.md)| | [optional] | ### 返回类型 [**\OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult**](../Model/ResponseOpenAPIExtractTextResult.md) ### HTTP请求头 - **Content-Type**: `multipart/form-data` - **Accept**: `*/*` [[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档) [[返回模型列表]](../../README.md#模型文档) [[返回README]](../../README.md) ## `tokenCount()` ```php tokenCount($token_count_param): \OpenAPI\Client\Model\ResponseOpenAPITokensCountResult ``` 元梦ai-token统计 元梦ai,token统计 ### 示例 ```php tokenCount($token_count_param); print_r($result); } catch (Exception $e) { echo 'Exception when calling AiApi->tokenCount: ', $e->getMessage(), PHP_EOL; } ``` ### 参数 | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **token_count_param** | [**\OpenAPI\Client\Model\TokenCountParam**](../Model/TokenCountParam.md)| | [optional] | ### 返回类型 [**\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult**](../Model/ResponseOpenAPITokensCountResult.md) ### HTTP请求头 - **Content-Type**: `application/json` - **Accept**: `*/*` [[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档) [[返回模型列表]](../../README.md#模型文档) [[返回README]](../../README.md)