PromptSection

org.llm4s.agent.graph.middleware.PromptSection
See thePromptSection companion class
@Experimental
object PromptSection

Attributes

Companion
class
Source
AgentMiddleware.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def apply(id: String, text: String, cacheable: Boolean): PromptSection

Attributes

Source
AgentMiddleware.scala
def charsFor(tokens: Int): Long

The most characters a section of tokens estimated tokens holds: cut a section's text to this to bound it.

The most characters a section of tokens estimated tokens holds: cut a section's text to this to bound it.

Attributes

Source
AgentMiddleware.scala
def estimatedTokens(chars: Long): Long

The tokens chars characters of section text are estimated at - one per four, rounded up - the estimate the agent bounds its sections by (maxPromptSectionTokens), and a middleware bounds its own section by.

The tokens chars characters of section text are estimated at - one per four, rounded up - the estimate the agent bounds its sections by (maxPromptSectionTokens), and a middleware bounds its own section by.

Attributes

Source
AgentMiddleware.scala