id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
Openai_Text_Generation/47832_11_0.txt
* All features * Documentation * GitHub Skills * Blog * Solutions
Openai_Text_Generation/47832_74_0.txt
> Perhaps you need to upgrade your ` langchain ` . and It seems that you don't need ` websocket ` , so it should be removed,like this:
Openai_Text_Generation/284713_27_0.txt
RonaldGRuckus February 26, 2023, 10:02pm 11 Yes I have the same issue in English. Not too often, maybe 2-5% of all my objects return broken. Depending on the structure of information that it’s reading.
Openai_Text_Generation/284713_5_0.txt
e.g of the object returned gone wrong. { “Headline1”: { “Description”: “Britain’s Boris Johnson starts Brexit 2020 with risks of more strife”, “Date”: “January 01, 2020” }, “Headline2”: { “Description”: “Crowds flock to Westminster as Johnson promises to deliver Brexit”, “Date”: “January 05, 2020” }, “Headline3...
Openai_Text_Generation/63646_103_0.txt
edited > uniswap_daily_interest = pd.read_csv("uniswap_daily_interest.csv") > dataset={"df": uniswap_daily_interest} tools = > [CustomPythonAstREPLTool(locals=dataset)] tool_names = [tool.name for tool > in tools] prompt = > CustomOpenAIFunctionsAgent.create_prompt(system_message=SystemMessage(content="You > are finan...
Openai_Text_Generation/63646_111_0.txt
> I also encountered a similar problem (when using gpt-3.5-turbo), but this > issue disappeared when I switched to using gpt4. +1 on that, I can verify that gpt-4 respects the given instructions on how to format the final answer. it seems to be an llm issue rather than a langchain agent issue --- All reactions
Openai_Text_Generation/47832_4_0.txt
Host and manage packages * Security
Openai_Text_Generation/284713_28_0.txt
It can also add its own information, such as extra nested objects / arrays. Like you said, there’s definitely uses for it though; I’m happy with the results and is still plenty worth the cleanup. In your case, have you tried the same in English? I haven’t practiced too much in other languages, but I do notice slightly...
Openai_Text_Generation/284713_50_0.txt
Indeed, this parameter impacts negatively JSON structure output… We’ll try to avoid to use it. Thanks. I’d be very interested in knowing why it does impact JSON structure actually ? PaulBellow
Openai_Text_Generation/63646_71_0.txt
Sorry, something went wrong. Copy link
Openai_Text_Generation/284713_54_0.txt
> [{“role”: “user”, “content”: “Hello!”}] [ {"role": "user", "content": "Hello!"}, {"role": "user", "content": "Hello Again!"}, {"role": "user", "content": "Hello Three Times!"}, {"role": "user", "content": "Hello Forever!"}, ] HTH
Openai_Text_Generation/47832_20_0.txt
Search Clear
Openai_Text_Generation/63646_0_0.txt
Skip to content ## Navigation Menu
Openai_Text_Generation/63646_12_0.txt
For * Enterprise * Teams * Startups * Education
Openai_Text_Generation/63646_19_0.txt
Search or jump to... # Search code, repositories, users, issues, pull requests...
Openai_Text_Generation/63646_34_0.txt
# Issue: openai functions agent does not respect tools and arguments #6364 Open
Openai_Text_Generation/Openai_Text_Generation_4_1.txt
ompts and images are filtered based on our content policy, returning an error when a prompt or image is flagged. Language-specific tips Using in-memory image data The Node.js examples in the guide above use the fs module to read image data from disk. In some cases, you may have your image data in memory instead. Here'...
Openai_Text_Generation/63646_69_0.txt
### batmanscode commented Jul 15, 2023
Openai_Text_Generation/47832_9_0.txt
Plan and track work * Discussions
Openai_Text_Generation/63646_43_0.txt
class CustomPythonAstREPLTool(PythonAstREPLTool): name = "python" description = ( "A Python shell. Use this to execute python commands. " "The input must be an object as follows: " "{'__arg1': 'a valid python command.'} " "When using this too...
Openai_Text_Generation/47832_15_0.txt
* Open Source * GitHub Sponsors
Openai_Text_Generation/47832_49_0.txt
edited Have you tried SteerCode ? This is a generated response To get the final answer from the output, you can use the appropriate output parser class based on the agent you are using. Here's an example using the SelfAskOutputParser:
Openai_Text_Generation/284713_19_0.txt
I’m surprised it hasn’t been mentioned yet, but those news headlines weren’t actually retrieved, but hallucinated; it does a great job looking real, and sometimes, by chance, they are. Secondly, why bother using a language model for something that can be accomplished with logic?
Openai_Text_Generation/47832_77_0.txt
### jakesteelman commented May 31, 2023
Openai_Text_Generation/284713_40_0.txt
stouch: > Then I made a more complcated request
Openai_Text_Generation/Openai_Text_Generation_1_1.txt
u can also force the model to generate a user-facing message by setting tool_choice: "none". Note that the default behavior (tool_choice: "auto") is for the model to decide on its own whether to call a function and if so which function to call. Example invoking multiple function calls in one response You can find mor...
Openai_Text_Generation/63646_50_0.txt
### falmanna commented Jun 20, 2023
Openai_Text_Generation/47832_88_0.txt
reinershir commented Jun 21, 2023 > > message_queue > Hello reinershir > could you explain to me how did you use web socket with your custom > callback > like here, from where i can get message_queue and how i can use it > CustomAsyncCallBackHandler(message_queue)
Openai_Text_Generation/63646_121_0.txt
Copy link ###
Openai_Text_Generation/63646_68_0.txt
Sorry, something went wrong. Copy link
Openai_Text_Generation/284713_43_0.txt
Screenshot 2023-02-27 at 9.23.53 AM 2198×798 48.8 KB Hope this helps
Openai_Text_Generation/63646_4_0.txt
Host and manage packages * Security
Openai_Text_Generation/63646_47_0.txt
It's a general performance issue with the model - it hallucinates and ignores instructions like enums. Using natural language or sudocode prompts to return JSON gives consistently better results. The solution is not to use functions. --- 👍 2 batmanscode and chiang-yuan reacted with thumbs up emoji All reacti...
Openai_Text_Generation/63646_127_0.txt
Milestone No milestone
Openai_Text_Generation/47832_24_0.txt
## Use saved searches to filter your results more quickly Name
Openai_Text_Generation/63646_128_0.txt
Development No branches or pull requests
Openai_Text_Generation/234_3_0.txt
Pretend you are an expert language translator user prompt:
Openai_Text_Generation/47832_19_0.txt
Search or jump to... # Search code, repositories, users, issues, pull requests...
Openai_Text_Generation/63646_88_0.txt
Sorry, something went wrong. Copy link
Openai_Text_Generation/284713_34_0.txt
Then I made a more complcated request : "Create a valid JSON array of objects to list famous french books : [{ \"title\": \"Book title\", \"release_date\": \"Release date in France, formatted as YYYY-MM\", \"subject\": \"Book subject\", \"location\": \"Place where lived the author\...
Openai_Text_Generation/63646_23_0.txt
Cancel Submit feedback # Saved searches
Openai_Text_Generation/63646_104_0.txt
You need to tell the LLM what are the datasets variables names in the system message. The LLM doesn't know what is inside the python env, so you have to tell it. --- All reactions Sorry, something went wrong.
Openai_Text_Generation/284713_44_0.txt
1 Like Tarot App - GPT generated reading and card
Openai_Text_Generation/63646_129_0.txt
12 participants ## Footer
Openai_Text_Generation/284713_7_0.txt
I have found not putting the “String” in “” gives a more consistent result and also capitalising the S in sting! That also did not work in this case until I changed the request to “News Stories”. Only then did it give me an object with “Headline” and then an array of 5 stories.
Openai_Text_Generation/284713_0_0.txt
OpenAI Developer Forum # Getting response data as a fixed & Consistent JSON response
Openai_Text_Generation/63646_123_0.txt
Sorry, something went wrong. Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
Openai_Text_Generation/47832_22_0.txt
We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted
Openai_Text_Generation/63646_3_0.txt
Automate any workflow * Packages
Openai_Text_Generation/284713_38_0.txt
Hi @stouch I tested your prompt above and got a valid JSON completion:
Openai_Text_Generation/284713_2_0.txt
Hi, Apologies if this is a stupid question! I have been playing with the API and trying to get the output it gives me returned to my project in a consistent way, so that I can always read a given response from the “choices” part of the returned object. However, it appears reasonable frequently that OpenAI ignores my...
Openai_Text_Generation/63646_42_0.txt
### Suggestion: I temporarily fixed it by 1- extending the ` OpenAIFunctionsAgent ` and overriding the ` _parse_ai_message ` to handle arguments confusion. 2- extending the ` PythonAstREPLTool ` and altering its name and description a bit.
Openai_Text_Generation/63646_80_0.txt
> > hey @li-xiaohui > I had to initialize the agent manually, here is how. >> >> >> dataset={"df": df} >> tools = [CustomPythonAstREPLTool(locals=dataset)]
Openai_Text_Generation/63646_106_0.txt
xiaofeifei218 commented Aug 17, 2023 I also encountered a similar problem (when using gpt-3.5-turbo), but this issue disappeared when I switched to using gpt4. --- 👍 1 SavvasMohito reacted with thumbs up emoji
Openai_Text_Generation/47832_17_0.txt
GitHub community articles Repositories
Openai_Text_Generation/284713_8_0.txt
Give me 5 news stories from January 2020 from the UK with the date and a headline. Return these statements as a JSON Object with the structure {“Headline”:[“Description”:String,“Date”:Date]}. Do not return any non-json text or numbering. So I guess the message is name your object definitions differently from the tex...
Openai_Text_Generation/284713_46_0.txt
{ "model": "text-davinci-003", "prompt": "Create a valid JSON array of objects to list famous french books :\n[{\"title\": \"Book title\", \"release_date\": \"Release date in France, formatted as YYYY-MM\", \"subject\": \"Book subject\", \"location\": \"Place where lived the author\", \"characte...
Openai_Text_Generation/47832_52_0.txt
Sorry, something went wrong. Copy link
Openai_Text_Generation/47832_30_0.txt
Additional navigation options * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights
Openai_Text_Generation/284713_14_0.txt
The prompt is very important to getting consistent results. Show it exactly what you want, rather than tell. The following approach works for me, just as a fun example, of how to get it to dynamically generate and consistently format completions in JSON const prompt = ` pretend to be an expert child ...
Openai_Text_Generation/284713_25_0.txt
Yes, in many cases it is. It’s always important to determine which stack will work the best for your application. In this case, GPT is not.
Openai_Text_Generation/63646_83_0.txt
>> tools=tools, verbose=True >> )
Openai_Text_Generation/63646_84_0.txt
>> > > Very useful, thanks @falmanna Hey What is the SystemMessaage and how do you import it? --- All reactions
Openai_Text_Generation/63646_73_0.txt
edited @falmanna , what are the relevant imports for ` CustomPythonAstREPLTool ` and ` CustomOpenAIFunctionsAgent ` ? --- All reactions
Openai_Text_Generation/63646_95_0.txt
Copy link ###
Openai_Text_Generation/284713_18_0.txt
2 Likes RonaldGRuckus February 26, 2023, 9:40pm 7
Openai_Text_Generation/47832_23_0.txt
Cancel Submit feedback # Saved searches
Openai_Text_Generation/63646_118_0.txt
Contributor Author ###
Openai_Text_Generation/63646_53_0.txt
Sorry, something went wrong. baswenneker mentioned this issue Jun 20, 2023
Openai_Text_Generation/63646_76_0.txt
falmanna commented Jul 17, 2023 > @falmanna , what are the relevant imports for ` CustomPythonAstREPLTool ` > and ` CustomOpenAIFunctionsAgent ` ? from langchain.callbacks import StdOutCallbackHandler from langchain.schema import LLMResult from langchain.tools.python.tool import PythonAstREPLT...
Openai_Text_Generation/47832_103_0.txt
## Footer © 2024 GitHub, Inc.
Openai_Text_Generation/284713_22_0.txt
If NLP is a critical component you should consider fine-tuning an entity extraction model. GPT will hallucinate and return broken/incorrectly structured JSON. A lot. 1 Like
Openai_Text_Generation/47832_89_0.txt
I have written it on my personal blog, you can refer to it: https://reiner.host/posts/8f0289a1.html --- ❤️ 1 adhammhaydat reacted with heart emoji All reactions
Openai_Text_Generation/63646_85_0.txt
Sorry, something went wrong. Copy link
Openai_Text_Generation/63646_115_0.txt
Copy link ###
Openai_Text_Generation/63646_92_0.txt
Contributor Author ###
Openai_Text_Generation/284713_30_0.txt
I’ll try to request in english if it gives us better results. But anyway we need to traduce json values in french then, so this 'll lead other issues on traduction process. In my case, in the context of my requests, it’s about 15% of JSON arrays produced which are totally broken. I request array of objects containing ...
Openai_Text_Generation/63646_91_0.txt
Sorry, something went wrong. Copy link
Openai_Text_Generation/47832_25_0.txt
Query To see all available qualifiers, see our documentation .
Openai_Text_Generation/Openai_Text_Generation_3_6.txt
w fine-tuning jobs Authenticate your Weights and Biases account with OpenAI Authentication is done by submitting a valid W&B API key to OpenAI. Currently, this can only be done via the Account Dashboard, and only by account administrators. Your W&B API key will be stored encrypted within OpenAI and will allow OpenAI to...
Openai_Text_Generation/47832_54_0.txt
nithinreddyyyyyy commented May 17, 2023 > Have you tried SteerCode ? This is a generated response To get the final > answer from the output, you can use the appropriate output parser class > based on the agent you are using. Here's an example using the > SelfAskOutputParser: > > > from langchain.agents.se...
Openai_Text_Generation/63646_1_0.txt
Toggle navigation Sign in
Openai_Text_Generation/63646_81_0.txt
>> tool_names = [tool.name for tool in tools] >> prompt = CustomOpenAIFunctionsAgent.create_prompt(system_message=SystemMessage(content=prefix))
Openai_Text_Generation/63646_21_0.txt
Search syntax tips # Provide feedback
Openai_Text_Generation/63646_52_0.txt
All reactions * 👍 1 reaction
Openai_Text_Generation/63646_32_0.txt
Sign up for GitHub By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.
Openai_Text_Generation/47832_62_0.txt
Sorry, something went wrong. Copy link
Openai_Text_Generation/47832_68_0.txt
### nithinreddyyyyyy commented May 22, 2023
Openai_Text_Generation/47832_50_0.txt
from langchain.agents.self_ask_with_search.output_parser import SelfAskOutputParser output = agent.run("what is Grass Type which pokemnon has highest speed and lowest speed?") output_parser = SelfAskOutputParser() parsed_output = output_parser.parse(output) if isinstance(parsed_o...
Openai_Text_Generation/63646_51_0.txt
> It's a general performance issue with the model - it hallucinates and > ignores instructions like enums. Using natural language or sudocode prompts > to return JSON gives consistently better results. The solution is not to use > functions. This is really interesting because it is supposed to be the other way. This m...
Openai_Text_Generation/47832_38_0.txt
## Comments Copy link
Openai_Text_Generation/63646_131_0.txt
* Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can’t perform that action at this time.
Openai_Text_Generation/47832_28_0.txt
{{ message }} langchain-ai / langchain Public
Openai_Text_Generation/63646_5_0.txt
Find and fix vulnerabilities * Codespaces
Openai_Text_Generation/284713_1_0.txt
API davidpearce December 31, 2022, 1:22pm 1
Openai_Text_Generation/47832_70_0.txt
import pandas as pd from IPython.display import Markdown, display from langchain.agents import create_csv_agent from langchain.chat_models import ChatOpenAI import os from langchain.agents import load_tools from langchain.agents import initialize_agent from langchain.agents imp...
Openai_Text_Generation/47832_39_0.txt
### nithinreddyyyyyy commented May 16, 2023
Openai_Text_Generation/63646_122_0.txt
prova commented Feb 5, 2024 This is still happening though with gpt-3.5-turbo. --- All reactions
Openai_Text_Generation/47832_66_0.txt
to use: ` llm=ChatOpenAI(temperature=0.5, model_name="gpt-3.5-turbo", verbose=False,streaming=True,callbacks=[CustomAsyncCallBackHandler(message_queue)]) ` I used WebSocket, you can remove it if you don't need it --- All reactions Sorry, something went wrong.
Openai_Text_Generation/284713_47_0.txt
PaulBellow February 27, 2023, 4:49pm 18 stouch: