# StringPromptValue

> **Class** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/prompt_values/StringPromptValue)

String prompt value.

## Signature

```python
StringPromptValue(
    self,
    *args: Any = (),
    **kwargs: Any = {},
)
```

## Extends

- `PromptValue`

## Properties

- `text`
- `type`

## Methods

- [`get_lc_namespace()`](https://reference.langchain.com/python/langchain-core/prompt_values/StringPromptValue/get_lc_namespace)
- [`to_string()`](https://reference.langchain.com/python/langchain-core/prompt_values/StringPromptValue/to_string)
- [`to_messages()`](https://reference.langchain.com/python/langchain-core/prompt_values/StringPromptValue/to_messages)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/9f232caa7a8fe1ca042a401942d5d90d54ceb1a6/libs/core/langchain_core/prompt_values.py#L54)