Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(OpenAI) Add model_name to LLMResult.llm_output #1713

Merged

Conversation

mariokostelac
Copy link
Contributor

Given that different models have very different latencies and pricings, it's benefitial to pass the information about the model that generated the response. Such information allows implementing custom callback managers and track usage and price per model.

Addresses #1557.

Given that different models have very different latencies and pricings, it's benefitial to pass the information about the model that generated the response.
Such information allows implementing custom callback managers and track usage and price per model.

Addresses langchain-ai#1557.
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love this!

@hwchase17 hwchase17 merged commit aff44d0 into langchain-ai:master Mar 17, 2023
bdonkey added a commit to bdonkey/langchain that referenced this pull request Mar 23, 2023
* master: (68 commits)
  hotfix (langchain-ai#1742)
  Harrison/move docs (langchain-ai#1741)
  move docs (langchain-ai#1740)
  bump version to 114 (langchain-ai#1739)
  Harrison/latex splitter (langchain-ai#1738)
  Harrison/blackboard loader (langchain-ai#1737)
  docs: add docs link to agent toolkits (langchain-ai#1735)
  fix: agent json parser fails with text in suffix (langchain-ai#1734)
  Harrison/official method (langchain-ai#1728)
  Sagemaker Endpoint LLM (langchain-ai#1686)
  adding new agent types in comments (langchain-ai#1711)
  (OpenAI) Add model_name to LLMResult.llm_output (langchain-ai#1713)
  Fix all the bug in init Tool in docs (langchain-ai#1725)
  Bump duckdb-engine to 0.7.0 (langchain-ai#1726)
  Add HTML document_loader that includes page title metadata (langchain-ai#1720)
  fix async in agent (langchain-ai#1723)
  pydantic/json parsing (langchain-ai#1722)
  Loosen PyYAML dependency (langchain-ai#1698)
  Adding ability to `return_pl_id` to all PromptLayer Models in LangChain (langchain-ai#1699)
  fallback to {} for None metadata from Chroma (langchain-ai#1714)
  ...
mariokostelac pushed a commit to mariokostelac/langchain that referenced this pull request Mar 24, 2023
This makes sure OpenAI and ChatOpenAI have the same llm_output, and allow tracking usage per model.
Same work for OpenAI was done in langchain-ai#1713.
hwchase17 pushed a commit that referenced this pull request Mar 24, 2023
This makes sure OpenAI and ChatOpenAI have the same llm_output, and
allow tracking usage per model. Same work for OpenAI was done in
#1713.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants