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

community: Update OCI data science integration #27083

Merged
merged 87 commits into from
Oct 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
95dce88
llm streaming support
mingkang111 Jun 14, 2024
7a0ee2a
llm async invoke support
mingkang111 Jun 21, 2024
da3261a
improvement on odsc llm integration
mingkang111 Jun 28, 2024
03eaa7e
improvement on odsc llm integration
mingkang111 Jun 28, 2024
87154d9
added ChatOCIModelDeploymentEndpoint
mingkang111 Jul 10, 2024
bec5e09
poc tool calling
mingkang111 Jul 10, 2024
b89e692
with_structured_output support
mingkang111 Jul 11, 2024
32efb77
added framework specific plugin
mingkang111 Jul 11, 2024
a2d7fcd
added framework specific plugin
mingkang111 Jul 11, 2024
f31efff
improvement on odsc llm integration
mingkang111 Jul 11, 2024
fc0b29d
clean up
mingkang111 Jul 11, 2024
03f2102
fixed by comments: improved error messages and added docstring
mingkang111 Jul 12, 2024
89d1f48
improvement on docstrings
mingkang111 Jul 12, 2024
58a920e
added test cases
mingkang111 Jul 12, 2024
f8b88f3
added test import
mingkang111 Jul 12, 2024
d2d125f
improvement on notebook example
mingkang111 Jul 12, 2024
6607755
improvement on notebook example
mingkang111 Jul 12, 2024
a1abbff
improvement on notebook example
mingkang111 Jul 16, 2024
6e989ad
improvement on notebook example, added sample return
mingkang111 Jul 16, 2024
8adc8dc
improvement on notebook example, added structured output
mingkang111 Jul 16, 2024
4366304
improvement on notebook example, added structured output
mingkang111 Jul 16, 2024
dcb8ade
clean code
mingkang111 Jul 19, 2024
5978c74
clean code
mingkang111 Jul 19, 2024
2f1bdb4
clean code
mingkang111 Jul 19, 2024
8a787a6
create base class for invoking
mingkang111 Jul 19, 2024
6ceaaf6
fixed by comments
mingkang111 Jul 19, 2024
a492c91
backward compatibility for TGI class
mingkang111 Jul 19, 2024
aebcd45
modified argument name
mingkang111 Jul 19, 2024
77c8dd9
fixed by comments
mingkang111 Jul 19, 2024
31f5c3c
fixed by comments
mingkang111 Jul 19, 2024
b72122a
fixed by comments
mingkang111 Jul 19, 2024
2d7a5b7
fixed by comments
mingkang111 Jul 19, 2024
8245a9b
fixed by comments
mingkang111 Jul 19, 2024
3ccdf44
changed error type
mingkang111 Jul 19, 2024
c52e9f5
added more pydoc
mingkang111 Jul 22, 2024
ad67b58
added example of customized usage
mingkang111 Jul 22, 2024
39ac70f
Merge pull request #1 from mingkang111/oci_integration_update
mingkang111 Jul 22, 2024
0505a52
Merge branch 'odsc_integration_improvement' of github.com:mingkang111…
mingkang111 Jul 22, 2024
4f00e4d
made improvement on chatmodel
mingkang111 Jul 22, 2024
35dcd72
added tgi chat model
mingkang111 Jul 23, 2024
7cce776
added tgi chat model
mingkang111 Jul 23, 2024
cd9d29f
improvements on documentation
mingkang111 Jul 24, 2024
fe4bbbb
renamed files
mingkang111 Jul 24, 2024
631d75d
renamed files
mingkang111 Jul 24, 2024
2fa1630
renamed files
mingkang111 Jul 24, 2024
a638dac
fixed by comments
mingkang111 Jul 24, 2024
1ece89e
Merge pull request #3 from mingkang111/chatmodel_plugin
mingkang111 Jul 25, 2024
e9ce071
resolved conflicts
mingkang111 Jul 30, 2024
51a65ac
clean code
mingkang111 Jul 30, 2024
48ac568
Merge remote-tracking branch 'mingkang111_langchain/odsc_integration_…
mrDzurb Aug 22, 2024
8020fc2
Merge branch 'master' of github.com:langchain-ai/langchain into langc…
qiuosier Sep 30, 2024
08e8743
Update LLM and Chat Model.
qiuosier Sep 30, 2024
5311bc1
Add tests.
qiuosier Sep 30, 2024
05fb9f5
Update notebooks.
qiuosier Sep 30, 2024
01c499b
Update imports from langchain-openai.
qiuosier Sep 30, 2024
b9209c0
Merge pull request #1 from mrDzurb/qq/updates
qiuosier Oct 1, 2024
1998369
Fix typo in docstring.
qiuosier Oct 1, 2024
c18d5a7
Require langchain-openai for chat model tests.
qiuosier Oct 1, 2024
20ef517
Add Oracle copyright
qiuosier Oct 2, 2024
b6a98ee
Update chat model test.
qiuosier Oct 2, 2024
0bf8f7c
Merge remote-tracking branch 'origin/master' into qq/oci_data_science
qiuosier Oct 2, 2024
eb78ae6
Update chat model docstring.
qiuosier Oct 2, 2024
f5b82ff
Update docstring.
qiuosier Oct 3, 2024
805530e
Update API docs.
qiuosier Oct 3, 2024
4248f42
Use model_validator instead of pre_init.
qiuosier Oct 3, 2024
529d03a
Update imports.
qiuosier Oct 3, 2024
3fa79b2
Reduce current_count to 127 in check_pydantic.sh
qiuosier Oct 3, 2024
4059ef3
Remove extra blank lines.
qiuosier Oct 3, 2024
9589318
Update import and docstrings.
qiuosier Oct 3, 2024
7ac26e6
Update imports.
qiuosier Oct 3, 2024
5cac14c
Update imports.
qiuosier Oct 3, 2024
4ffdde9
Update docstring.
qiuosier Oct 3, 2024
d4cdbac
Add langchain_openai as test dependency.
qiuosier Oct 3, 2024
542063b
Format tests.
qiuosier Oct 3, 2024
13f8398
Update typing in tests.
qiuosier Oct 3, 2024
64e9c8d
Update typing in tests.
qiuosier Oct 3, 2024
8852e49
Update tests.
qiuosier Oct 3, 2024
d107d3d
Update typing in tests.
qiuosier Oct 3, 2024
b21fa0b
Update docs.
qiuosier Oct 3, 2024
fa03e75
Merge branch 'master' into qq/oci_data_science
qiuosier Oct 3, 2024
e8dcf84
Replace region with placeholder.
qiuosier Oct 3, 2024
9a0de2a
Merge branch 'master' into qq/oci_data_science
qiuosier Oct 4, 2024
c224193
Merge branch 'master' into qq/oci_data_science
qiuosier Oct 4, 2024
f32b0f0
Merge branch 'master' into qq/oci_data_science
qiuosier Oct 8, 2024
e346bd7
Merge remote-tracking branch 'origin/master' into qq/oci_data_science
qiuosier Oct 11, 2024
7784005
Move is_lc_serializable() to OCI base class.
qiuosier Oct 11, 2024
5e57604
Merge branch 'master' into qq/oci_data_science
efriis Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improvement on notebook example, added structured output
  • Loading branch information
mingkang111 committed Jul 16, 2024
commit 8adc8dc7eecace9c3668b0b2f26b92571c0b7aeb
53 changes: 52 additions & 1 deletion docs/docs/integrations/chat/oci_model_deployment_endpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,58 @@
{
"cell_type": "markdown",
"metadata": {},
"source": []
"source": [
"## Structured output"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'setup': 'Why did the cat get stuck in the tree?',\n",
" 'punchline': 'Because it was chasing its tail!'}"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from langchain_core.pydantic_v1 import BaseModel\n",
"from langchain_community.chat_models import ChatOCIModelDeploymentEndpoint\n",
"\n",
"\n",
"class Joke(BaseModel):\n",
" \"\"\"A setup to a joke and the punchline.\"\"\"\n",
"\n",
" setup: str\n",
" punchline: str\n",
"\n",
"\n",
"chat = ChatOCIModelDeploymentEndpoint(\n",
" endpoint=\"https://modeldeployment.us-ashburn-1.oci.customer-oci.com/<ocid>/predict\",\n",
")\n",
"structured_llm = chat.with_structured_output(Joke, method=\"json_mode\")\n",
"output = structured_llm.invoke(\n",
" \"Tell me a joke about cats, respond in JSON with `setup` and `punchline` keys\"\n",
")\n",
"\n",
"output.dict()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## API reference\n",
"\n",
"For detailed documentation of all ChatOCIModelDeploymentEndpoint features and configurations head to the [API reference](https://api.python.langchain.com/en/latest/chat_models/langchain_community.chat_models.oci_data_science_model_deployment_endpoint.ChatOCIModelDeploymentEndpoint.html)."
]
}
],
"metadata": {
Expand Down