mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-08 10:55:18 +03:00
Big docs refactor! Motivation is to make it easier for people to find resources they are looking for. To accomplish this, there are now three main sections: - Getting Started: steps for getting started, walking through most core functionality - Modules: these are different modules of functionality that langchain provides. Each part here has a "getting started", "how to", "key concepts" and "reference" section (except in a few select cases where it didnt easily fit). - Use Cases: this is to separate use cases (like summarization, question answering, evaluation, etc) from the modules, and provide a different entry point to the code base. There is also a full reference section, as well as extra resources (glossary, gallery, etc) Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
3.5 KiB
3.5 KiB
In [1]:
from langchain.llms import OpenAI
from langchain.llms.loading import load_llmIn [2]:
!cat llm.json{
"model_name": "text-davinci-003",
"temperature": 0.7,
"max_tokens": 256,
"top_p": 1.0,
"frequency_penalty": 0.0,
"presence_penalty": 0.0,
"n": 1,
"best_of": 1,
"request_timeout": null,
"_type": "openai"
}In [3]:
llm = load_llm("llm.json")In [4]:
!cat llm.yaml_type: openai best_of: 1 frequency_penalty: 0.0 max_tokens: 256 model_name: text-davinci-003 n: 1 presence_penalty: 0.0 request_timeout: null temperature: 0.7 top_p: 1.0
In [5]:
llm = load_llm("llm.yaml")In [6]:
llm.save("llm.json")In [7]:
llm.save("llm.yaml")In [ ]: