(note) assumes that you have setup a route in the gateway called 'mychatbot_route'from langchain.chat_models import ChatJavelinAIGatewayfrom langchain.schema import HumanMessage, SystemMessagemessages = [    SystemMessage(        content="You are a helpful assistant that translates English to French."    ),    HumanMessage(        content="Artificial Intelligence has the power to transform humanity and make the world a better place"    ),]chat = ChatJavelinAIGateway(    gateway_uri="http://localhost:8000", # replace with service URL or host/port of Javelin    route="mychatbot_route",    model_name="gpt-3.5-turbo",    params={        "temperature": 0.1    })print(chat(messages))    ---------------------------------------------------------------------------    ImportError                               Traceback (most recent call last)    Cell In[8], line 1    ----> 1 from langchain.chat_models import ChatJavelinAIGateway          2 from langchain.schema import HumanMessage, SystemMessage          4 messages = [          5     SystemMessage(          6         content="You are a helpful assistant that translates English to French."       (...)         10     ),         11 ]    ImportError: cannot import name 'ChatJavelinAIGateway' from 'langchain.chat_models' (/usr/local/Caskroom/miniconda/base/lib/python3.11/site-packages/langchain/chat_models/__init__.py)Step 6: Conclusion
This tutorial introduced the Javelin AI Gateway and demonstrated how to interact with it using the Python SDK.
Remember to check the Javelin Python SDK for more examples and to explore the official documentation for additional details.Happy coding!PreviousHuggingface TextGen InferenceNextJSONFormerStep 1: IntroductionStep 2: InstallationStep 3: Completions ExampleCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This Jupyter Notebook will explore how to interact with the Javelin AI Gateway using the Python SDK.
This Jupyter Notebook will explore how to interact with the Javelin AI Gateway using the Python SDK. ->: (note) assumes that you have setup a route in the gateway called 'mychatbot_route'from langchain.chat_models import ChatJavelinAIGatewayfrom langchain.schema import HumanMessage, SystemMessagemessages = [    SystemMessage(        content="You are a helpful assistant that translates English to French."    ),    HumanMessage(        content="Artificial Intelligence has the power to transform humanity and make the world a better place"    ),]chat = ChatJavelinAIGateway(    gateway_uri="http://localhost:8000", # replace with service URL or host/port of Javelin    route="mychatbot_route",    model_name="gpt-3.5-turbo",    params={        "temperature": 0.1    })print(chat(messages))    ---------------------------------------------------------------------------    ImportError                               Traceback (most recent call last)    Cell In[8], line 1    ----> 1 from langchain.chat_models import ChatJavelinAIGateway          2 from langchain.schema import HumanMessage, SystemMessage          4 messages = [          5     SystemMessage(          6         content="You are a helpful assistant that translates English to French."       (...)         10     ),         11 ]    ImportError: cannot import name 'ChatJavelinAIGateway' from 'langchain.chat_models' (/usr/local/Caskroom/miniconda/base/lib/python3.11/site-packages/langchain/chat_models/__init__.py)Step 6: Conclusion
This tutorial introduced the Javelin AI Gateway and demonstrated how to interact with it using the Python SDK.
Remember to check the Javelin Python SDK for more examples and to explore the official documentation for additional details.Happy coding!PreviousHuggingface TextGen InferenceNextJSONFormerStep 1: IntroductionStep 2: InstallationStep 3: Completions ExampleCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.