-
Notifications
You must be signed in to change notification settings - Fork 285
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
feat(models)!: openAI 1.0 #1716
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
Co-authored-by: Xander Song <axiomofjoy@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
with patch.object(OpenAIModel, "_init_tiktoken", return_value=None): | ||
model = OpenAIModel(max_retries=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why need to patch this method here but not elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I know the other places you are referring to but the unfortunate side-effect is that tiktoken makes network calls so it fails in an isolated CI env. Yet another reason we probably shouldn't have this initialization as part of the construction process, let alone maybe be a part of the model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instantiating an azure model fails if an openai key is not detected (I'm not sure we need one if using the azure endpoint)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
went over implementation with @mikeldking
* git output via openai migrate * WIP * git output via openai migrate WIP * get pytests running * get pytests running * completions changes * fix llm_classify tests * fix llm generate tests * minimal test for openai * fix llama_index tests * add back model * fix openai * fix openai tests * Add explanations section for relevance * run GPT4-Turbo * update notebooks * migrate find clusters notebook * update more notebooks * fix relevance * fix tutorials/llm_generative_gpt_4.ipynb * add more tutorials * Start refactoring httpx tests to be order-agnostic * Finish refactoring classification tests * Refactor `generate` tests to be order-agnostic * Migrate to respx for langchain tracer tests * Update openai tracing tests to use respx * feat(evals): azure openai support * address pr comments * return early for azure * fix tiktoken failures * remove model name aliasing * make gpt-4 point to latest * ruff format * docs: update documentation * feat: update OpenAIInstrumentor to support openai>=1.0.0 and deprecate support for openai<1.0.0 (#1723) * correct unit test to mock completions endpoint (#1730) * Update langchain_pinecone_search_and_retrieval_tutorial.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update llama_index_search_and_retrieval_tutorial.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update llm_generative_gpt_4.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update milvus_llamaindex_search_and_retrieval_tutorial.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update ragas_retrieval_evals_tutorial.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update langchain_agent_tracing_tutorial.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update langchain_tracing_tutorial.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update llama_index_openai_agent_tracing_tutorial.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update llama_index_tracing_tutorial.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update langchain_retrieval_qa_with_sources_chain_tracing_tutorial.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update find_cluster_export_and_explore_with_gpt.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update evaluate_toxicity_classifications.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update evaluate_summarization_classifications.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update evaluate_QA_classifications.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update evaluate_hallucination_classifications.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * Update evaluate_code_readability_classifications.ipynb Co-authored-by: Xander Song <axiomofjoy@gmail.com> * document breaking changes, bump langchain * add more details to the breaking changes * langchain bump * fix qa evals notebook * fix style * update major version * remove logging token count warnings --------- Co-authored-by: Dustin Ngo <dustin@arize.com> Co-authored-by: Xander Song <axiomofjoy@gmail.com>
resolves #1715
Updates everything to OpenAI 1.0
requests
andresponses
@anticorrelatorDocumentation
request_timeout
parameterManual tests
Regression Testing