Skip to content

Commit

Permalink
-1 max token description for openai (langchain-ai#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
thepok authored Dec 13, 2022
1 parent 2fbb152 commit 137356d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion langchain/llms/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ class OpenAI(LLM, BaseModel):
temperature: float = 0.7
"""What sampling temperature to use."""
max_tokens: int = 256
"""The maximum number of tokens to generate in the completion."""
"""The maximum number of tokens to generate in the completion.
-1 returns as many tokens as possible given the prompt and
the models maximal context size."""
top_p: float = 1
"""Total probability mass of tokens to consider at each step."""
frequency_penalty: float = 0
Expand Down

0 comments on commit 137356d

Please sign in to comment.