Giter VIP home page Giter VIP logo

langchain-advanced's People

Contributors

sugarforever avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

langchain-advanced's Issues

AuthenticationError: Incorrect API key provided: https://************************************************.com.

I'm generating an openai api format link for wizardcoder-13b to use in autogen with support for downloading various documents, but your google collab notebook doesn't accept it.

---------------------------------------------------------------------------
AuthenticationError                       Traceback (most recent call last)
[<ipython-input-24-85f187986a5e>](https://localhost:8080/#) in <cell line: 5>()
      3     embedding_function=OpenAIEmbeddings()
      4 )
----> 5 vectorstore.add_documents(docs)

16 frames
[/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py](https://localhost:8080/#) in _interpret_response_line(self, rbody, rcode, rheaders, stream)
    773         stream_error = stream and "error" in resp.data
    774         if stream_error or not 200 <= rcode < 300:
--> 775             raise self.handle_error_response(
    776                 rbody, rcode, resp.data, rheaders, stream_error=stream_error
    777             )

AuthenticationError: Incorrect API key provided: https://************************************************.com. You can find your API key at https://platform.openai.com/account/api-keys.

Is there anything I can do about it? (+ if you know another way to generate OpenAI API format link, I would be very grateful if you could share it). Also if the error isn't in the link, I can assume it's in the way I'm uploading it (I edited the code a bit):

import autogen
import os

config_list = [
    {
        "model": "mistral-7b",
        "api_key": "https://brothers-chip-training-potentially.trycloudflare.com", # - This is roughly what the links I generate look like (regular autogen accepts them and works fine, but I need document support)
    },
]

gpt4_api_key = "https://brothers-chip-training-potentially.trycloudflare.com"
os.environ['OPENAI_API_KEY'] = gpt4_api_key

Once again, I would like to point out that normal autogen accepts and works with this link, but with LangChain it does not allow it for some reason.
image

[Library Deprecated]

In https://github.com/sugarforever/LangChain-Advanced/blob/main/langchain_with_openai_assistants_api.ipynb:

!pip install -U -q "langchain==0.0.331rc2" langchain-experimental "openai>=1.1"
from langchain_experimental.openai_assistant import OpenAIAssistantRunnable

According to the latest doc:
https://python.langchain.com/docs/modules/agents/agent_types/openai_assistants#using-only-openai-tools, you could use:

!pip install -U -q langchain langchain-experimental "openai>=1.1"
from langchain.agents.openai_assistant import OpenAIAssistantRunnable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.